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  :)

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM