Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

pip install yotta fails with pip v10 (due to project_generator dependency) #835

Closed
microbit-carlos opened this issue Apr 18, 2018 · 8 comments

Comments

@microbit-carlos
Copy link

Please feel free to close this issue, as the problem is not directly caused by yotta itself, but since it will affect users trying to install yotta I though it would be useful to have some info and visibility here.

pip install with pip v10 (released on the 14th of April) will fail when trying to install dependency project_generator:

Collecting project_generator<0.9.0,>=0.8.0 (from valinor<1.0,>=0.0.0->yotta)
  Downloading https://files.pythonhosted.org/packages/b4/bb/91ad20d17485d01829453767323dd2d13b325a0c7154bf5f8f375cbaac1e/project_generator-0.8.16.zip (86kB)
    100% |████████████████████████████████| 92kB 7.1MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/l1/szsxrhfj7v1fglxfv9b35lz80000gn/T/pip-install-wJUzJQ/project-generator/setup.py", line 18, in <module>
        from pip.req import parse_requirements
    ImportError: No module named req

This has already been reported in the project_generator issue tracker, with more info over there: project-generator/project_generator#440

@0xc0170
Copy link
Contributor

0xc0170 commented Apr 19, 2018

As progen was updated (thanks @microbit-carlos for the fix).

Valinor should probably be updated to use the latest version (there's now 'project_generator>=0.8.0,<0.9.0',) and the fix is in 0.9.11

I can even propagate the fix to 0.8.x ?

CatGarab pushed a commit to kubos/kubos that referenced this issue May 10, 2018
There's a dependency incompatibility issue which causes the `RUN pip install -r https://raw.githubusercontent.com/kubos/kubos-cli/master/requirements.txt` command to fail: ARMmbed/yotta#835
Forcing the pip install to remain at v9 until the issue is resolved
CatGarab pushed a commit to kubos/kubos-vagrant that referenced this issue May 10, 2018
There's a dependency incompatibility issue which causes the `RUN pip install -r https://raw.githubusercontent.com/kubos/kubos-cli/master/requirements.txt` command to fail: ARMmbed/yotta#835
Forcing the pip install to remain at v9 until the issue is resolved

(This is the same fix as kubos/kubos#79)
@0xc0170
Copy link
Contributor

0xc0170 commented Jun 11, 2018

I believe this can be closed?

@carlosperate
Copy link

carlosperate commented Jun 11, 2018

If the dependencies have been fixed and their version updated in the respective master branches, then it hasn't been published to PyPI yet. On a new environment with pip 10.0.1, trying to pip install yotta:

...
Collecting project_generator<0.9.0,>=0.8.0 (from valinor<1.0,>=0.0.0->yotta)
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/b4/bb/91ad20d17485d01829453767323dd2d13b325a0c7154bf5f8f375cbaac1e/project_generator-0.8.16.zip (86kB)
    100% |████████████████████████████████| 92kB 3.1MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/l1/szsxrhfj7v1fglxfv9b35lz80000gn/T/pip-install-d82c8koo/project-generator/setup.py", line 18, in <module>
        from pip.req import parse_requirements
    ModuleNotFoundError: No module named 'pip.req'

Probably better to keep it open until pip install works.

@ccrov
Copy link

ccrov commented Jul 13, 2018

when i use "pip install yotta " : what i should do ?
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "", line 1, in
File "/private/var/folders/rc/78dl9vfd3fd0ppwjl0zjlph00000gn/T/pip-install-gq_hc0/project-generator/setup.py", line 18, in
from pip.req import parse_requirements
ImportError: No module named req

----------------------------------------

Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/rc/78dl9vfd3fd0ppwjl0zjlph00000gn/T/pip-install-gq_hc0/project-generator/
allans-MacBook-Air:pxt allan$

@microbit-carlos
Copy link
Author

The easiest way to get around it at the moment is to install an older version of pip, the latest v9 should work.

@0xc0170
Copy link
Contributor

0xc0170 commented Jul 13, 2018

I published 0.8.17 that addresses this issue (cherry picked fix from 0.9.x). That should resolve this

Please close

@microbit-carlos
Copy link
Author

Just tried it and pip install yotta now works again, thanks @0xc0170!

@thegecko
Copy link
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants