pip无法在conda虚拟环境中安装模块

时间:2020-09-08 15:06:49

标签: python pip conda ubuntu-server

我正在尝试在创建的虚拟环境中安装新模块。我在ubuntu服务器上安装了带有anaconda的python。我创建了一个名为env_zipline的环境。现在,我试图通过pip安装名为deepdow的模块,因为它无法通过conda获得。当我尝试下面的代码时,出现以下错误。有人知道这个问题可能是什么,并建议我如何解决这个问题?

代码:

pip install deepdow

错误:

Traceback (most recent call last):
  File "/home/username/anaconda3/envs/env_zipline/bin/pip", line 7, in <module>
    from pip._internal import main
  File "/home/username/anaconda3/envs/env_zipline/lib/python3.5/site-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/home/username/anaconda3/envs/env_zipline/lib/python3.5/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
ImportError: cannot import name 'FormatControl'

也尝试过:

conda install python pip3

错误:

Collecting package metadata: done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  - pip3

Current channels:

  - https://repo.anaconda.com/pkgs/main/linux-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/linux-64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/linux-64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

代码:

/home/username/anaconda3/envs/env_zipline/bin/pip install deepdow

错误:

Traceback (most recent call last):
  File "/home/username/anaconda3/envs/env_zipline/bin/pip", line 7, in <module>
    from pip._internal import main
  File "/home/username/anaconda3/envs/env_zipline/lib/python3.5/site-packages/pip/_internal/__init__.py", line 42, in <module>
    from pip._internal import cmdoptions
  File "/home/username/anaconda3/envs/env_zipline/lib/python3.5/site-packages/pip/_internal/cmdoptions.py", line 16, in <module>
    from pip._internal.index import (
ImportError: cannot import name 'FormatControl'

0 个答案:

没有答案