pipenv install fails with git url in requirements.txt
See original GitHub issue$ python -m pipenv.help output
Pipenv version: '11.10.0'
Pipenv location: '/usr/lib/python3.6/site-packages/pipenv'
Python location: '/usr/bin/python'
Other Python installations in PATH
:
-
2.7
:/usr/bin/python2.7
-
2.7
:/usr/bin/python2.7
-
3.6
:/usr/bin/python3.6m
-
3.6
:/usr/bin/python3.6
-
3.6.5
:/usr/bin/python
-
2.7.14
:/usr/bin/python2
-
3.6.5
:/usr/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.16.3-1-ARCH',
'platform_system': 'Linux',
'platform_version': '#1 SMP PREEMPT Thu Apr 19 09:17:56 UTC 2018',
'python_full_version': '3.6.5',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
LANG
DISPLAY
INVOCATION_ID
LFS
EDITOR
NODE_PATH
COLORTERM
MOZ_PLUGIN_PATH
TERMINAL
XDG_VTNR
XDG_SESSION_ID
USER
GOPATH
PWD
HOME
LESSHISTFILE
JOURNAL_STREAM
GTK_MODULES
MAIL
WINDOWPATH
TERM
SHELL
VTE_VERSION
QT_IM_MODULE
XMODIFIERS
PYTHONSTARTUP
XDG_SEAT
SHLVL
WINDOWID
MAVEN_OPTS
LOGNAME
DBUS_SESSION_BUS_ADDRESS
XDG_RUNTIME_DIR
XAUTHORITY
PATH
GTK_IM_MODULE
_
OLDPWD
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONUNBUFFERED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/g/.go/bin:/home/g/.node_modules/bin
SHELL
:/bin/bash
EDITOR
:/usr/bin/vim
LANG
:en_US.UTF-8
PWD
:/home/g/ml_defense
Contents of Pipfile
(‘/home/g/ml_defense/Pipfile’):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
scipy = "==0.19.0"
numpy = "==1.12.1"
scikit-learn = "==0.18.1"
matplotlib = "==2.0.0"
Theano = "==0.9.0"
Lasagne = "==0.1"
[dev-packages]
[requires]
python_version = "2.7"
Expected result
Behaviour should be the same of running pip install -r requirements.txt
Actual result
> pipenv install -r requirements.txt --skip-lock --verbose
Requirements file provided! Importing into Pipfile…
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/pipenv/vendor/requirements/fragment.py", line 18, in parse_fragment
for key_value_string in fragment_string.split('&')
ValueError: dictionary update sequence element #0 has length 4; 2 is required
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/pipenv", line 11, in <module>
load_entry_point('pipenv==11.10.0', 'console_scripts', 'pipenv')()
File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/pipenv/cli.py", line 366, in install
selective_upgrade=selective_upgrade,
File "/usr/lib/python3.6/site-packages/pipenv/core.py", line 1794, in do_install
import_requirements(r=project.path_to(requirements), dev=dev)
File "/usr/lib/python3.6/site-packages/pipenv/core.py", line 212, in import_requirements
project.add_package_to_pipfile(package_string, dev=dev)
File "/usr/lib/python3.6/site-packages/pipenv/project.py", line 667, in add_package_to_pipfile
converted = convert_deps_from_pip(package_name)
File "/usr/lib/python3.6/site-packages/pipenv/utils.py", line 536, in convert_deps_from_pip
req = get_requirement(dep)
File "/usr/lib/python3.6/site-packages/pipenv/utils.py", line 125, in get_requirement
req = [r for r in requirements.parse(dep)][0]
File "/usr/lib/python3.6/site-packages/pipenv/utils.py", line 125, in <listcomp>
req = [r for r in requirements.parse(dep)][0]
File "/usr/lib/python3.6/site-packages/pipenv/vendor/requirements/parser.py", line 50, in parse
yield Requirement.parse(line)
File "/usr/lib/python3.6/site-packages/pipenv/vendor/requirements/requirement.py", line 220, in parse
return cls.parse_line(line)
File "/usr/lib/python3.6/site-packages/pipenv/vendor/requirements/requirement.py", line 162, in parse_line
fragment = parse_fragment(groups['fragment'])
File "/usr/lib/python3.6/site-packages/pipenv/vendor/requirements/fragment.py", line 23, in parse_fragment
fragment_string=fragment_string
ValueError: Invalid fragment string egg=Theano==0.8.git
Steps to replicate
Use this requirements.txt
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Error importing requirements.txt file containing VCS URL with ...
I typed the enter key twice because it didn't seem to stop, and it failed with the error message below. $ pipenv install...
Read more >pipenv Documentation - Read the Docs
Pipenv is a tool that aims to bring the best of all packaging worlds (bundler, composer, npm, cargo, yarn, etc.) to the. Python...
Read more >Advanced Usage of Pipenv - Python Packaging Authority
Pipenv allows you to open any Python module that is installed (including ones in your codebase), with the $ pipenv open command: $...
Read more >Installing private Python packages · Gemfury Dev Center
This allows pip to implicitly install public packages that your private package may depend on. Install packages via requirements.txt. Add the --extra-index-url ......
Read more >How to use pipenv to install package from github
I can't duplicate your exact problem, but I can't get pipenv to automatically recognise the requirements either. It fails having created a ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Because pip just ignores the invalid tag. It is still invalid.
@techalchemy note that
git+https://github.com/Theano/Theano.git@15c90dd3#egg=Theano==0.8.git
works with pip.You can test it with
pip install -r https://raw.githubusercontent.com/Lasagne/Lasagne/v0.1/requirements.txt