-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 10 is unable to install from non-editable VCS URLs #5251
Comments
I saw this same error on Python 2 and found that using pip 9 worked as expected. I wonder if this is related to the deprecation and removal of the egg switch? Removing that also seemed to solve the issue. |
I'm experiencing this issue on Travis-CI with Python 3.5.2 and Traceback (most recent call last):
...
File "/home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 415, in setup_py
assert self.source_dir, "No source dir for %s" % self
AssertionError: No source dir for cnx-query-grammar from git+https://github.com/Connexions/cnx-query-grammar.git#egg=cnx-query-grammar in /home/travis/virtualenv/python3.5.2/lib/python3.5/site-packages (from -r requirements/./test.txt (line 9)) |
Exact same issue, on |
Also using the #egg= parameter. I found this thread: #1749 |
Oddly removing the whole virtualenv and reinstalling (including the get-pip bit) worked. |
... but it failed again on the second deploy on top of an existing virtualenv (which should have been a no-op since all the packages are installed already but I guess it redownloads the git packages each time). |
Initial installation works, but attempts to reinstall are the problem space. So far I'm seeing a difference in the |
Also experiencing this issue with pip 10.0.0 |
In case others are also debugging this. I've narrowed down the two paths, first install and reinstall, to the difference in the results coming out of the resolver's ... I could be off in the weeds though. It is my first time looking at this code. 😕 |
My workaround: |
O... so the requirements file I'm working on isn't using So part of this issue is user error??? The other part of it is that we should get back something to the effect of |
If it helps, mine also doesn't use |
|
FYI we are running into this in pipenv (our testing infrastructure caught this), here's what I can say on the topic:
As far as the distinction between editable and non-editable dependencies, from a resolution standpoint we can resolve dependency graphs for editable dependencies but can't for non-editable dependencies. Still-- we test to ensure that they can be installed, which now fails. As a temporary fix we are moving our |
I am unable to reproduce this. Could someone provide steps to reproduce? If it's with in a docker container, that'd be awesome. |
Just run this twice with pip 10 in a clean venv, it will fail on the second try: pip install git+https://github.com/requests/requests.git#egg=requests |
I can't reproduce:
|
@di @pradyunsg first spotted: https://travis-ci.org/pypa/pipenv/jobs/367322542#L715 log: ◰³ tempenv-3321664538cc ~/g/pypa-pipenv tmp $… pip install --no-cache-dir pip
Requirement already satisfied: pip in /home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages (10.0.0)
◰³ tempenv-3321664538cc ~/g/pypa-pipenv tmp $… pip install git+https://github.com/benjaminp/six.git#egg=six
Collecting six from git+https://github.com/benjaminp/six.git#egg=six
Cloning https://github.com/benjaminp/six.git to /tmp/pip-install-2ff500pr/six
Building wheels for collected packages: six
Running setup.py bdist_wheel for six ... done
Stored in directory: /tmp/pip-ephem-wheel-cache-ebgi9ij6/wheels/a9/36/0a/8173089e25b3c1df51c0bb21d21ec8dc5d7ee9d0ec9b6b51e1
Successfully built six
Installing collected packages: six
Successfully installed six-1.11.0
◰³ tempenv-3321664538cc ~/g/pypa-pipenv tmp $… pip install git+https://github.com/benjaminp/six.git#egg=six
Requirement already satisfied: six from git+https://github.com/benjaminp/six.git#egg=six in /home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages (1.11.0)
Building wheels for collected packages: six
Exception:
Traceback (most recent call last):
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 305, in run
session=session, autobuilding=True
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/wheel.py", line 773, in build
python_tag=python_tag,
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/wheel.py", line 633, in _build_one
python_tag=python_tag)
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/wheel.py", line 637, in _build_one_inside_env
if self.__build_one(req, temp_dir.path, python_tag=python_tag):
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/wheel.py", line 663, in __build_one
base_args = self._base_setup_args(req)
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/wheel.py", line 659, in _base_setup_args
SETUPTOOLS_SHIM % req.setup_py
File "/home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 415, in setup_py
assert self.source_dir, "No source dir for %s" % self
AssertionError: No source dir for six from git+https://github.com/benjaminp/six.git#egg=six in /home/hawk/.virtualenvs/tempenv-3321664538cc/lib/python3.6/site-packages |
And a Dockerfile which reproduces: FROM python:3.6-alpine3.7
ENV PYTHONUNBUFFERED=1
ENV LC_ALL=en_US.UTF-8
RUN apk update \
&& apk add git
WORKDIR /app/
RUN set -ex \
&& pip install --upgrade pip \
&& pip install git+https://github.com/benjaminp/six.git#egg=six \
&& pip install git+https://github.com/benjaminp/six.git#egg=six
CMD ["/bin/bash"] |
We can reproduce on our build machines, try this:
Here's my output:
|
@pfmoore This is an important core use-case which is broken. I'm looking into a fix right now. |
Also experiencing this issue |
@pradyunsg Cool, keep me posted - if there's anything I can help with let me know. |
If someone could take #5280 for a spin and check if that fixes this issue, that would be awesome! :) |
@pradyunsg I didn't do extensive testing, but #5280 resolves the issue for our case. |
Thanks for the quick turnaround @pradyunsg — perhaps someone else can whip up a test case Haven’t tested yet but can in the morning. What is the planned release timeline for pip 10.0.1? If we can avoid hacking around this in our point release I’d prefer to stick to our normal subprocess invocation of /cc @pfmoore |
It'll happen this week, in all likelihood. :) |
Correct - basically once all the issues/PRs marked as release blockers are resolved, I'll be doing a final pass of the issues and then releasing 10.0.1. |
#5280 works for me too |
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. |
Description:
I'm trying to install a package from Git.
What I've run:
If I uninstall the package and then install, it works. But it continues to fail when trying install again.
The text was updated successfully, but these errors were encountered: