从'scipy.optimize'导入'minpack2'时出错

时间:2019-02-06 17:39:11

标签: python scipy

我正在尝试从python脚本中的Scipy包导入minpack2并收到此错误:

Traceback (most recent call last):
  File "markowitz.py", line 2, in <module>
    from scipy import optimize
  File "/usr/lib/python3/dist-packages/scipy/optimize/__init__.py", line 232, in <module>
    from .optimize import *
  File "/usr/lib/python3/dist-packages/scipy/optimize/optimize.py", line 37, in <module>
    from .linesearch import (line_search_wolfe1, line_search_wolfe2,
  File "/usr/lib/python3/dist-packages/scipy/optimize/linesearch.py", line 18, in <module>
    from scipy.optimize import minpack2
ImportError: cannot import name 'minpack2' from 'scipy.optimize' (/usr/lib/python3/dist-packages/scipy/optimize/__init__.py)

我的python版本是:linux上的Python 3.7.2(默认值,2019年1月11日,21:31:15)[GCC 5.4.0 20160609]

Scipy是使用pip安装的,并且版本为0.18。

0 个答案:

没有答案