|
Ubuntu18.04下pybind11的安装
https://github.com/pybind/pybind11
C ++ 11和Python之间的无缝可操作性
首先安装cmake:http://www.ai111.vip/thread-977-1-1.html
查看版本:cmake --version
jiang@jiang-Ubuntu:~/GNU_Radio_works/gr-adapt-master$ cmake --version
cmake version 3.19.4
a.先下载pybind11的源代码:https://github.com/pybind/pybind11
b.进入pybind源代码,并建立新文件build,进行build,cmake,make..,具体如下:
cd 到pybind11目录
mkdir build
cd build
cmake ..
sudo make
sudo make install
如果不通过源码编译的方式安装:
sudo apt-get install python-pybind11
- jiang@jiang-Ubuntu:~/downloads/pybind11-master/build$ sudo make install
- [ 4%] Built target pybind11_cross_module_tests
- [ 95%] Built target pybind11_tests
- [100%] Built target cross_module_gil_utils
- Install the project...
- -- Install configuration: "MinSizeRel"
- -- Installing: /usr/local/include/pybind11
- -- Installing: /usr/local/include/pybind11/cast.h
- -- Installing: /usr/local/include/pybind11/numpy.h
- -- Installing: /usr/local/include/pybind11/gil.h
- -- Installing: /usr/local/include/pybind11/buffer_info.h
- -- Installing: /usr/local/include/pybind11/common.h
- -- Installing: /usr/local/include/pybind11/eval.h
- -- Installing: /usr/local/include/pybind11/iostream.h
- -- Installing: /usr/local/include/pybind11/complex.h
- -- Installing: /usr/local/include/pybind11/functional.h
- -- Installing: /usr/local/include/pybind11/pytypes.h
- -- Installing: /usr/local/include/pybind11/chrono.h
- -- Installing: /usr/local/include/pybind11/attr.h
- -- Installing: /usr/local/include/pybind11/stl.h
- -- Installing: /usr/local/include/pybind11/detail
- -- Installing: /usr/local/include/pybind11/detail/class.h
- -- Installing: /usr/local/include/pybind11/detail/type_caster_base.h
- -- Installing: /usr/local/include/pybind11/detail/common.h
- -- Installing: /usr/local/include/pybind11/detail/init.h
- -- Installing: /usr/local/include/pybind11/detail/internals.h
- -- Installing: /usr/local/include/pybind11/detail/descr.h
- -- Installing: /usr/local/include/pybind11/detail/typeid.h
- -- Installing: /usr/local/include/pybind11/eigen.h
- -- Installing: /usr/local/include/pybind11/options.h
- -- Installing: /usr/local/include/pybind11/pybind11.h
- -- Installing: /usr/local/include/pybind11/embed.h
- -- Installing: /usr/local/include/pybind11/stl_bind.h
- -- Installing: /usr/local/include/pybind11/operators.h
- -- Installing: /usr/local/share/cmake/pybind11/pybind11Config.cmake
- -- Installing: /usr/local/share/cmake/pybind11/pybind11ConfigVersion.cmake
- -- Installing: /usr/local/share/cmake/pybind11/FindPythonLibsNew.cmake
- -- Installing: /usr/local/share/cmake/pybind11/pybind11Common.cmake
- -- Installing: /usr/local/share/cmake/pybind11/pybind11Tools.cmake
- -- Installing: /usr/local/share/cmake/pybind11/pybind11NewTools.cmake
- -- Installing: /usr/local/share/cmake/pybind11/pybind11Targets.cmake
- jiang@jiang-Ubuntu:~/downloads/pybind11-master/build$
复制代码
|
|