-
Notifications
You must be signed in to change notification settings - Fork 3k
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
pip install fails with ImportError: No module named pip._vendor
in pip==19.0.1
#6190
Comments
I am experiencing the same issue using CI with Python 2.7, pip 19.0 and Pendulum 1.4.4.
|
We are experiencing the same issue but this time on different platform: Environment
Command
Output
|
Same stacktrace as @Hernrup running in docker. FROM python:3.6.8-alpine3.8
RUN pip3 install --upgrade pip setuptools
RUN pip3 install pendulum==1.5.1 |
it seems that that package breaks apart on build isolation as the pip pep517 module is loaded instead of the actual own build module of the package - i do wonder if its install able when build isolation is disabled |
the issue is made stranger by the fact that it seems like they supply wheels for manylinux and windows situations, so the issue is only hit by more exotic/minimalist setups |
To make it even more weird, |
@eliasbrange the main difference between master and 1.x is the build system section in pyproject.toml this might be a pip issue where there should be a bigger/better warning or disabled build isolation |
@RonnyPfannschmidt I have experimented with this in pipenv after running into this error in our test suite and setting $ pip install pendulum==1.5.1
Collecting pendulum==1.5.1
Using cached https://files.pythonhosted.org/packages/ca/a5/0f9fe22bae01ba13b823a38da280dc5823f739ff68d8e130def665655925/pendulum-1.5.1.tar.gz
Installing build dependencies ... done
Getting requirements to build wheel ... error
Complete output from command /home/hawk/.virtualenvs/tempenv-087c296744106/bin/python /home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpxacy4ane:
Traceback (most recent call last):
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.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-hsx23c8f/overlay/lib/python3.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-hsx23c8f/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 101, in _get_build_requires
_run_setup()
File "/tmp/pip-build-env-hsx23c8f/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 85, in _run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 48, in <module>
from build import *
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/build.py", line 7, in <module>
from pip._vendor import pytoml
ModuleNotFoundError: No module named 'pip'
----------------------------------------
Command "/home/hawk/.virtualenvs/tempenv-087c296744106/bin/python /home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpxacy4ane" failed with error code 1 in /tmp/pip-install-mubdbgfx/pendulum $ pip install --no-build-isolation pendulum==1.5.1
Collecting pendulum==1.5.1
Using cached https://files.pythonhosted.org/packages/ca/a5/0f9fe22bae01ba13b823a38da280dc5823f739ff68d8e130def665655925/pendulum-1.5.1.tar.gz
Preparing wheel metadata ... error
Complete output from command /home/hawk/.virtualenvs/tempenv-087c296744106/bin/python /home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpg2zjaz2o:
Traceback (most recent call last):
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
main()
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 69, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/setuptools/build_meta.py", line 125, in prepare_metadata_for_build_wheel
_run_setup()
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/setuptools/build_meta.py", line 85, in _run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 48, in <module>
from build import *
File "/home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/build.py", line 12, in <module>
from .envbuild import BuildEnvironment
ImportError: attempted relative import with no known parent package
----------------------------------------
Command "/home/hawk/.virtualenvs/tempenv-087c296744106/bin/python /home/hawk/.virtualenvs/tempenv-087c296744106/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpg2zjaz2o" failed with error code 1 in /tmp/pip-install-ibvy4q2z/pendulum |
its possible that this is a previously un-triggered bug in |
tracking issue: pypa/setuptools#1642 |
(This should probably be consolidated into #6163 FYI) |
Closing as duplicate of #6163, as @techalchemy suggests. |
Actually, I'm not a 100% sure; so I'll undo that. |
I'm facing the same error as well, as part of my CI. As an interim solution I froze the pip version to 18.1, as a work around. |
pip install pip===18.1 |
|
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Environment
Description
Hi guys, I ran into an unexpected pip install failure for a specific package after my CI silently upgraded pip to
19.0.1
(The problem is also present inpip==19.0
for what it is worth).I am posting this as a new issue since it started to occur after an upgrade to pip, albeit I understand it may be an underlying issue with
pendulum==1.4.4
.Thank you for reading this in advance!
Expected behavior
The following should succeed in a clean env with
python 2.7.14
andpip 19
:How to Reproduce
This issue can be reproduced in a docker container stemming from the official
python:2.7.14
docker image:Notes
pip installing pendulum==1.4.4 in the packaged version of pip in a official python:2.7.14 docker container works as expected:
It also works in pip==18.1:
The text was updated successfully, but these errors were encountered: