python3.7+win10导入cvxopt时提示,找不到指定的模块:
import cvxopt
Traceback (most recent call last):
File "", line 1, in
File "D:\program\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "D:\program\python\.VirtualPyEnv\Py37matlab\lib\site-packages\cvxopt\__init__.py", line 50, in
import cvxopt.base
File "D:\program\JetBrains\PyCharm 2019.2\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: 找不到指定的模块。
解决方法如下:
https://stackoverflow.com/questions/24289984/import-issue-for-cvxopt-on-windows
numpy-kml: https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
cvxopt: https://www.lfd.uci.edu/~gohlke/pythonlibs/#cvxopt
也可以用我放csdn上的:
numpy-kml: https://download.csdn.net/download/lxfhahaha/11449644
cvxopt:https://download.csdn.net/download/lxfhahaha/11451635
pip uninstall numpy cvxopt
pip install numpy-1.17.0+mkl-cp37-cp37m-win_amd64.whl
pip install cvxopt-1.2.3-cp37-cp37m-win_amd64.whl
然后再 import cvxopt 测试一下