1

在尝试安装 cvxopt 之前,已安装 Xcode 和 Xcode 命令行工具。此外,还安装了 Python 2.7.11。

cvxopt 的安装说明是:

python setup.py install

为了测试安装是否成功,安装说明建议尝试一个示例;即,

cd examples/doc/chap8
python lp.py

不幸的是,该示例无法正常工作,如下所示。

cB_9% python lp.py
Traceback (most recent call last):
  File "lp.py", line 3, in <module>
    from cvxopt import matrix, solvers  
  File "build/bdist.macosx-10.6-intel/egg/cvxopt/__init__.py", line 255, in <module>
  File "build/bdist.macosx-10.6-intel/egg/cvxopt/lapack.py", line 7, in <module>
  File "build/bdist.macosx-10.6-intel/egg/cvxopt/lapack.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/brucesmi/.python-eggs/cvxopt-1.1.8-py2.7-macosx-10.6-intel.egg-tmp/cvxopt/lapack.so, 2): Symbol not found: _dgesv_
  Referenced from: /Users/brucesmi/.python-eggs/cvxopt-1.1.8-py2.7-macosx-10.6-intel.egg-tmp/cvxopt/lapack.so
  Expected in: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
 in /Users/brucesmi/.python-eggs/cvxopt-1.1.8-py2.7-macosx-10.6-intel.egg-tmp/cvxopt/lapack.so

为了找出问题所在,我给出了以下命令:

cB_10% ls /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib

返回

/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib

所以,我不知道如何解决这个问题。任何帮助,将不胜感激。

4

0 回答 0