New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On travis: ImportError: No module named download #23

Closed
robnagler opened this Issue Apr 24, 2018 · 4 comments

Comments

Projects
None yet
2 participants
@robnagler
Member

robnagler commented Apr 24, 2018

If you look at the previous build, it's got the same version of pip, but it doesn't get this error:

$ python --version
Python 2.7.14
$ pip --version
pip 9.0.1 from /home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages (python 2.7)
install.1
$ pip install setuptools==32.1.3
$ python setup.py pkdeploy
Traceback (most recent call last):
  File "setup.py", line 7, in <module>
    from pykern.pksetup import setup
  File "/home/travis/build/radiasoft/pykern/pykern/pksetup.py", line 51, in <module>
    import pip.download
ImportError: No module named download
@slacAWallace

This comment has been minimized.

slacAWallace commented May 17, 2018

I had a very similar issue, which prevented installation of sirepo.

Traceback (most recent call last): File "setup.py", line 7, in <module> from pykern.pksetup import setup File "/home/vagrant/src/radiasoft/codes/pykern-20180517.171435/pykern/pykern/pksetup.py", line 51, in <module> import pip.download ImportError: No module named download 2018-05-17T17:14:30Z install_main Unexpected error; Install failed.

@robnagler

This comment has been minimized.

Member

robnagler commented May 17, 2018

Looks like the moved pip.download to pip._internal.download. From the Release Notes:

Move all of pip's APIs into the pip._internal package, properly reflecting the fact that pip does not currently have any public APIs. (#4696, #4700)

We use pip to parse requirements.txt so we'll change that to whatever is recommended.

robnagler added a commit that referenced this issue May 19, 2018

Working on #23: moved requirements into setup.py; remove pip dependency
pip removed all APIs in version 10 so pip.download and pip.main are not allowed.
It's impractical to support pykern being installed automatically so packages
will have to install pykern before they run setup.py if they refer to
pykern in setup.py (e.g. using pksetup). For RadiaSoft, this isn't a
problem, because we install from known environments setup by our curl
installers (usually inside vagrant or docker). For others, it's a design
flaw that you can't use a library in setup.py that is not in base python.
To get projex_test.py to work with tox, added some code inside pksetup.py
that supports looking for the right python version.
Removed extras_require, because I don't think that's necessary any more
to build jupyterhub.
@robnagler

This comment has been minimized.

Member

robnagler commented May 19, 2018

@slacAWallace Please try the last step again. Thanks.

robnagler added a commit to radiasoft/rslinac that referenced this issue May 19, 2018

robnagler added a commit to radiasoft/rslinac that referenced this issue May 19, 2018

robnagler added a commit to radiasoft/rsconf that referenced this issue May 19, 2018

robnagler added a commit to radiasoft/rszgoubi that referenced this issue May 19, 2018

robnagler added a commit to radiasoft/rslinac that referenced this issue May 19, 2018

@slacAWallace

This comment has been minimized.

slacAWallace commented May 21, 2018

Yes that seemed to do the trick. Install was successful. Thanks!

@robnagler robnagler closed this May 21, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment