You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having trouble getting pipenv to deal with editable installs from git. I've narrowed down as much as possible for the purposes of this test. There's a repo here with the whole thing for reproducing.
This is the three line requirements.txt I'm using - each line has a slightly different, but apparently valid url scheme. Installing this with pip works fine.
requirements.txt found, instead of Pipfile! Converting…
Warning: Your Pipfile now contains pinned versions, if your requirements.txt did.
We recommend updating your Pipfile to specify the "*" version, instead.
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
nv/utils.py", line 285, in actually_resolve_reps
dep[len('-e '):]
File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/pip9/req/req_install.py", line 144, in from_editable
editable_req, default_vcs)
File "/usr/local/lib/python3.5/dist-packages/pipenv/vendor/pip9/req/req_install.py", line 1197, in parse_editable
"Could not detect requirement name, please specify one with #egg="
pip9.exceptions.InstallationError: Could not detect requirement name, please specify one with #egg=
Obviously the Pipfile.lock doesn't get created but the Pipfile does, and that contains this...
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
ges/pipenv/resolver.py", line 63, in resolve
verbose=verbose,
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/utils.py", line 425, in resolve_deps
pre,
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/utils.py", line 285, in actually_resolve_reps
dep[len('-e '):]
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 156, in from_editable
wheel_cache=wheel_cache)
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 91, in __init__
"Invalid requirement: '%s'\n%s" % (req, add_msg))
pip9.exceptions.InstallationError: Invalid requirement: 'wagtail_eventbrite@90bdfc680fc920eed8618d29aefac770d258c359#egg=wagtail_eventbrite'
= is not a valid operator. Did you mean == ?
If I try the lines one at a time pipenv lock on just the django_admin_list_filter_dropdown package produces:
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
encies(best_match):
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/patched/piptools/resolver.py", line 275, in _iter_dependencies
for dependency in self.repository.get_dependencies(ireq):
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 174, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 193, in get_legacy_dependencies
dist = ireq.get_dist()
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 1069, in get_dist
egg_info = self.egg_info_path('').rstrip('/')
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 515, in egg_info_path
'No files/directories in %s (from %s)' % (base, filename)
pip9.exceptions.InstallationError: No files/directories in None (from )
The other two both produce the same(ish) error:
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
ges/pipenv/resolver.py", line 63, in resolve
verbose=verbose,
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/utils.py", line 425, in resolve_deps
pre,
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/utils.py", line 285, in actually_resolve_reps
dep[len('-e '):]
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 156, in from_editable
wheel_cache=wheel_cache)
File "/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv/vendor/pip9/req/req_install.py", line 91, in __init__
"Invalid requirement: '%s'\n%s" % (req, add_msg))
pip9.exceptions.InstallationError: Invalid requirement: 'wagtail_eventbrite@90bdfc680fc920eed8618d29aefac770d258c359#egg=wagtail_eventbrite'
= is not a valid operator. Did you mean == ?
I don't really understand what I'm doing wrong.
$ python -m pipenv.help output (as run from the venv3 pipenv)
So I can see right away that it's this particular path which as @frostming pointed out, didn't translate properly. If you used git+https as he mentions the name and ref would be picked up. git+http:// isn't a valid URL scheme, you need to use https -- and then yes, you can parse out the ref and the name as he already mentioned and your entry will work fine
Issue
I'm having trouble getting pipenv to deal with editable installs from git. I've narrowed down as much as possible for the purposes of this test. There's a repo here with the whole thing for reproducing.
This is the three line requirements.txt I'm using - each line has a slightly different, but apparently valid url scheme. Installing this with pip works fine.
When I run
pipenv install
I get this output:Obviously the Pipfile.lock doesn't get created but the Pipfile does, and that contains this...
All the #egg= bits have been removed. So I try manually adding them to the Pipfile, relevant lines now look like this:
pipenv lock
produces this:If I try the lines one at a time
pipenv lock
on just thedjango_admin_list_filter_dropdown
package produces:The other two both produce the same(ish) error:
I don't really understand what I'm doing wrong.
$ python -m pipenv.help output (as run from the venv3 pipenv)
Pipenv version:
'11.9.0'
Pipenv location:
'/vagrant/test2/venv3/lib/python3.5/site-packages/pipenv'
Python location:
'/vagrant/test2/venv3/bin/python'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.5
:/usr/bin/python3.5m
3.5
:/vagrant/test2/venv3/bin/python3.5
3.5
:/usr/bin/python3.5
3.5.2
:/vagrant/test2/venv3/bin/python
2.7.12
:/usr/bin/python
2.7.12
:/usr/bin/python2
3.5.2
:/vagrant/test2/venv3/bin/python3
3.5.2
:/usr/bin/python3
PEP 508 Information:
System environment variables:
LESSCLOSE
VIRTUAL_ENV
USER
SSH_AUTH_SOCK
SSH_TTY
SHLVL
PYTHONUNBUFFERED
LS_COLORS
TERM
LANG
OLDPWD
SSH_CLIENT
_
PS1
SSH_CONNECTION
LC_CTYPE
XDG_RUNTIME_DIR
XDG_SESSION_ID
LANGUAGE
PIP_PYTHON_PATH
LESSOPEN
PYTHONDONTWRITEBYTECODE
PATH
SHELL
MAIL
PWD
HOME
LOGNAME
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/vagrant/test2/venv3/bin:/home/vagrant/bin:/home/vagrant/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/vagrant/test2
VIRTUAL_ENV
:/vagrant/test2/venv3
Contents of
Pipfile
('/vagrant/test2/Pipfile'):$ python -m pipenv.help output (called outside a venv with `python3 -m pipenv.help`
Pipenv version:
'11.9.0'
Pipenv location:
'/usr/local/lib/python3.5/dist-packages/pipenv'
Python location:
'/usr/bin/python3'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.5
:/usr/bin/python3.5m
3.5
:/usr/bin/python3.5
2.7.12
:/usr/bin/python
2.7.12
:/usr/bin/python2
3.5.2
:/usr/bin/python3
PEP 508 Information:
System environment variables:
LOGNAME
SHELL
LS_COLORS
_
TERM
LESSCLOSE
LANG
SSH_AUTH_SOCK
PATH
USER
SSH_CONNECTION
PS1
OLDPWD
SSH_CLIENT
LESSOPEN
LANGUAGE
PYTHONDONTWRITEBYTECODE
SSH_TTY
PWD
LC_CTYPE
MAIL
XDG_RUNTIME_DIR
SHLVL
XDG_SESSION_ID
PYTHONUNBUFFERED
PIP_PYTHON_PATH
HOME
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/vagrant/bin:/home/vagrant/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/vagrant/test1
Contents of
Pipfile
('/vagrant/test1/Pipfile'):Expected result
I expected it to install the dependencies and create valid working lines in the Pipfile.
Actual result
It created lines in the Pipfile that cause
pipenv lock
to break.Steps to replicate
You can re-create it exactly using the vagrant VM in this repo.
The text was updated successfully, but these errors were encountered: