How to apt install python-pybind11?

青春壹個敷衍的年華 提交于 2020-02-25 03:01:52

问题


I see form my project document that I need to install python-pybind11 by using

sudo apt -y install python-pybind11

but I got error like this:

Reading package lists... Done

Building dependency tree
Reading state information... Done

E: Unable to locate package python-pybind11

I'm not sure if python-pybind11 is a valid package, where can I check it?


回答1:


Use this to install pybind11:

pip install pybind11

Refer from Here.




回答2:


In Ubuntu 18.04

apt-get install python-pybind11

On Mac,

brew install pybind11

In Ubuntu 16.04, you'll need to install yourself. One way is as follows:

# Some prerequisites (but not all of them)
apt-get install cmake
pip3 install pytest

# Clone, build and install 
git clone https://github.com/pybind/pybind11.git 
cd pybind11 
mkdir build 
cd build 
cmake .. 
make install

Reference



来源:https://stackoverflow.com/questions/54704599/how-to-apt-install-python-pybind11

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!