1
我试图从Homebrew科学库安装NLopt库(http://ab-initio.mit.edu/wiki/index.php/NLopt)。它安装得很好,除了我不能从Python导入NLopt。为什么python无法从Homebrew Science中看到NLopt安装?Homebrew NLopt Python
我试图从Homebrew科学库安装NLopt库(http://ab-initio.mit.edu/wiki/index.php/NLopt)。它安装得很好,除了我不能从Python导入NLopt。为什么python无法从Homebrew Science中看到NLopt安装?Homebrew NLopt Python
确切的错误信息是什么?也许是同我:
我尝试在Python(在Windows上)
import nlopt
那么错误消息是这一个:
Traceback (most recent call last):
File "C:/Users/rrenier/Documents/Workspace/GIT/DimORC/Python/test.py",line 3, in <module>
import nlopt
File "C:\Python27\lib\site-packages\nlopt.py", line 35, in <module>
_nlopt = swig_import_helper()
File "C:\Python27\lib\site-packages\nlopt.py", line 31, in swig_import_helper
_mod = imp.load_module('_nlopt', fp, pathname, description)
ImportError: DLL load failed: Le module sp�cifi� est introuvable.
看来蟒蛇试图找到“nlopt。在文件夹“C:\ Python27 \ Lib \ site-packages”中不存在(甚至安装nlopt运行良好)的“pyd”。