HumanBrainProject / pyxus

Python API for Nexus
8 stars 8 forks source link

Got a ModuleNotFoundError: No module named 'pip.req' #27

Open MFSY opened 6 years ago

MFSY commented 6 years ago

Hi,

When running !pip install git+https://github.com/HumanBrainProject/pyxus@v0.1.3 through a python notebook, I got a ModuleNotFoundError: No module named 'pip.req' with the following stacktrace:

Collecting git+https://github.com/HumanBrainProject/pyxus@v0.1.3
  Cloning https://github.com/HumanBrainProject/pyxus (to revision v0.1.3) to /private/var/folders/9f/5ckq85t94cxgcdd5jms99_nj5rnk_x/T/pip-req-build-8l__jhdf
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/9f/5ckq85t94cxgcdd5jms99_nj5rnk_x/T/pip-req-build-8l__jhdf/setup.py", line 2, in <module>
        from pip.req import parse_requirements
    ModuleNotFoundError: No module named 'pip.req'

I'm using pip version 10.0.1 and python 3.6.2 as you can see below

pip --version pip 10.0.1 from /Applications/Anaconda/anaconda/envs/pyshacl/lib/python3.6/site-packages/pip (python 3.6)

python --version Python 3.6.2 :: Continuum Analytics, Inc.

May be a pip 10 incompatibility ?

Any idea on how to fix this.

Best.

MFSY commented 6 years ago

A solution is suggested here by @wizmer . Is it something you can consider adopting ?

MFSY commented 6 years ago

I tried something like: !pip install git+https://github.com/HumanBrainProject/pyxus@v0.5.1#egg=pyxus and it worked.

olinux commented 6 years ago

Hi! Thanks for the report! Yes, we got rid of the requirements-parsing starting with version 0.3.0 for both, these incompatibility issues with PIP 10 as well as streamlined dependency management. We could provide a fix for the 0.1.x versions if required, but would highly recommend to adapt to the new versions if possible. Please tell us, if you need a fix or can upgrade.

olinux commented 6 years ago

Addition: Please note, that pyxus now is also published to the test-pypi repository. If you want, you can therefore also make use of the more advanced versioning management by doing e.g. pip install --upgrade --extra-index-url https://testpypi.python.org/pypi "pyxus>=0.5,<0.6"

MFSY commented 6 years ago

Hi, Thank for the reply. I switched to v0.5.1 and it is working I think. I'll definitely use test-pypi.

Best.