Skip to content
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

ImportError: No module named pip._vendor error in 2.7.15 tag when running pip install #371

Closed
antxxxx opened this issue Jan 28, 2019 · 3 comments
Labels
question Usability question, not directly related to an error with the image

Comments

@antxxxx
Copy link

antxxxx commented Jan 28, 2019

There seems to be an issue with the image for tag 2.7.15 that is not there in 2.7.14 when installing pendulum via pip

This command works

docker run -it  python:2.7.14 pip install pendulum==1.4.4

with output

Collecting pendulum==1.4.4
  Downloading https://files.pythonhosted.org/packages/85/a5/9fc15751f9725923b170ad37d6c61031fc9e941bafd5288ca6ee51233284/pendulum-1.4.4.tar.gz (74kB)
    100% |████████████████████████████████| 81kB 2.1MB/s
  Installing build dependencies ... done
Collecting python-dateutil<3.0.0.0,>=2.6.0.0 (from pendulum==1.4.4)
  Downloading https://files.pythonhosted.org/packages/74/68/d87d9b36af36f44254a8d512cbfc48369103a3b9e474be9bdfe536abfc45/python_dateutil-2.7.5-py2.py3-none-any.whl (225kB)
    100% |████████████████████████████████| 235kB 5.4MB/s
Collecting tzlocal<2.0.0.0,>=1.5.0.0 (from pendulum==1.4.4)
  Downloading https://files.pythonhosted.org/packages/cb/89/e3687d3ed99bc882793f82634e9824e62499fdfdc4b1ae39e211c5b05017/tzlocal-1.5.1.tar.gz
Collecting pytzdata>=2018.3.0.0 (from pendulum==1.4.4)
  Downloading https://files.pythonhosted.org/packages/46/8b/d7fe0c5b24870438d5ed59ceab72d537c5374d7db3cc57107e4a922b3a23/pytzdata-2018.7-py2.py3-none-any.whl (971kB)
    100% |████████████████████████████████| 972kB 4.5MB/s
Collecting six>=1.5 (from python-dateutil<3.0.0.0,>=2.6.0.0->pendulum==1.4.4)
  Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting pytz (from tzlocal<2.0.0.0,>=1.5.0.0->pendulum==1.4.4)
  Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
    100% |████████████████████████████████| 512kB 4.6MB/s
Building wheels for collected packages: pendulum, tzlocal
  Running setup.py bdist_wheel for pendulum ... done
  Stored in directory: /root/.cache/pip/wheels/2f/4c/cd/f0cabf03ccb7edd9002875db9001108b33ebfc60b4ff9a61ae
  Running setup.py bdist_wheel for tzlocal ... done
  Stored in directory: /root/.cache/pip/wheels/15/ae/df/a67bf1ed84e9bf230187d36d8dcfd30072bea0236cb059ed91
Successfully built pendulum tzlocal
Installing collected packages: six, python-dateutil, pytz, tzlocal, pytzdata, pendulum
Successfully installed pendulum-1.4.4 python-dateutil-2.7.5 pytz-2018.9 pytzdata-2018.7 six-1.12.0 tzlocal-1.5.1
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

This command fails

docker run -it python:2.7.15 pip install pendulum==1.4.4

This is the output from failed command

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting pendulum==1.4.4
  Downloading https://files.pythonhosted.org/packages/85/a5/9fc15751f9725923b170ad37d6c61031fc9e941bafd5288ca6ee51233284/pendulum-1.4.4.tar.gz (74kB)
    100% |████████████████████████████████| 81kB 2.2MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  Complete output from command /usr/local/bin/python /usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpie_n9o:
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/tmp/pip-build-env-UjujEn/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 115, in get_requires_for_build_wheel
      return _get_build_requires(config_settings, requirements=['wheel'])
    File "/tmp/pip-build-env-UjujEn/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 101, in _get_build_requires
      _run_setup()
    File "/tmp/pip-build-env-UjujEn/overlay/lib/python2.7/site-packages/setuptools/build_meta.py", line 85, in _run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 47, in <module>
      from build import *
    File "/usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/build.py", line 7, in <module>
      from pip._vendor import pytoml
  ImportError: No module named pip._vendor

  ----------------------------------------
Command "/usr/local/bin/python /usr/local/lib/python2.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpie_n9o" failed with error code 1 in /tmp/pip-install-4x0fmV/pendulum

@wglambert wglambert added the question Usability question, not directly related to an error with the image label Jan 28, 2019
@wglambert
Copy link

pypa/pip#6190

@tianon
Copy link
Member

tianon commented Jan 31, 2019

Closing given that this is appropriately tracked at pypa/pip#6190 and isn't something we can really fix in the Docker image.

It is worth noting that newer versions of pendulum don't appear to be affected (I tried 2.0.4 successfully).

@tianon tianon closed this as completed Jan 31, 2019
@tianon
Copy link
Member

tianon commented Jan 31, 2019

(See also pypa/pip#6163, linked from that one, which appears to also be related.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Usability question, not directly related to an error with the image
Projects
None yet
Development

No branches or pull requests

3 participants