1

I'm trying to install a new module in a virtual environment I've created. I installed python with anaconda on my ubuntu server. I created an environment called env_zipline. now I'm trying to pip install a module called deepdow because it's not available through conda. When I tried the code below I get the errors below. Does anyone see what the issue might be and suggest how I can fix it?

code:

pip install deepdow

error:

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'

also tried:

conda install python pip3

error:

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.

code:

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

error:

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'
AMC
  • 2,642
  • 7
  • 13
  • 35
user3476463
  • 3,967
  • 22
  • 57
  • 117
  • Does anything [here](https://stackoverflow.com/questions/41060382/using-pip-to-install-packages-to-anaconda-environment) help? – 89f3a1c Sep 08 '20 at 15:08
  • @89f3a1c thank you for getting back to me so quickly. I've tried most of the suggestions in the link you sent, they don't seem to solve the issue. not installing pip again or using the full absolute path with pip. – user3476463 Sep 08 '20 at 15:23
  • 1
    Have you tried creating the environment from an environment.yml file, so that all dependencies are installed up-front? – AMC Sep 09 '20 at 23:53
  • @AMC I created a new virtual env with conda and it all worked fine, not sure what the issue was. – user3476463 Sep 15 '20 at 04:51
  • Modifying environments after they have been created does increase the risk that something will break. It's probably worse if pip is also involved. – AMC Sep 18 '20 at 00:18

0 Answers0