0

当我尝试在终端中运行命令时,它会引发错误

我正在使用 anaconda 来安装我的软件包和 python 2.7。

$ zipline ingest -b quandl

Traceback (most recent call last):
  File "/anaconda3/bin/zipline", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3241, in <module>
    @_call_aside
  File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3254, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/anaconda3/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'mock>=2.0' distribution was not found and is required by tables
4

1 回答 1

0

看来您需要安装mock软件包:

conda install mock

或者,如果前一个不起作用:

conda install -c conda-forge mock
于 2019-05-14T08:36:13.683 回答