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」。