pybind11 安装

 

注意:

1) 安装之前,最好把 /usr/bin/python 指向 python3,安装完再调回去。以后主要使用 python3.

2) 安装之前,最好先安装 boost.

---------------------------------------------------------------------------------------------------------------------------------

Prerequisites:

$ sudo apt-get install python-dev  (or python3-dev)

$ sudo apt-get install cmake

sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/  pytest

sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/  numpy

$ sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/  scipy

$ sudo pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/  pybind11

Get pybind11, from website: https://github.com/pybind/pybind11 to get the source package.

Get Eigen, from website: http://eigen.tuxfamily.org/index.php?title=Main_Page to get the source package.

for the above two source package, uncompoze it, and,

$ cd  that_folder

$ mkdir build

$ cd build

$ cmake ..

$ make check -j 4  (make and check, not necessary)

$ sudo make install  (maybe should disable python3 in /usr/bin/ if you use python2)

 

That's all  :)

 

posted @ 2018-08-09 14:28  Anonymous596  阅读(14869)  评论(0编辑  收藏  举报