这个错误是什么意思?
ImportError: libnlopt.so.0: cannot open shared object file: No such file or directory
我试图运行需要nlopt的python2脚本。
nlopt是由安装的
pip2 install --user nlopt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting nlopt
Using cached https://files.pythonhosted.org/packages/7f/4f/de7e64a295e86c9f1ee382076019e0526247969353eb29345da1a05854b6/nlopt-2.4.2.post2.tar.gz
Requirement already satisfied: numpy in /usr/lib/python2.7/dist-packages (from nlopt) (1.13.3)
Installing collected packages: nlopt
Running setup.py install for nlopt ... done
Successfully installed nlopt-2.4.2.post2
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
这意味着无法加载共享库。您可以通过执行以下操作解决问题:
sudo apt-get install libnlopt0
然后运行您的命令。
也就是说,如果您正在运行Debian / Ubuntu或衍生产品。如果不是,请使用您的发行版用于添加软件包的任何命令(在本例中为)libnlopt0
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句