pipenv update raises an IndexError
See original GitHub issueI tried to run pipenv update
. It errors.
Describe your environment
- OS Type: Ubuntu 17.10
- Python version: Python 3.6.4
- Pipenv version: pipenv, version 9.0.1
Expected result
A complete re-installation of the virtual environment.
Actual result
Got the following error instead:
pipenv update
Updating all dependencies from Pipfile…
Traceback (most recent call last):
File "/home/omer/.pyenv/versions/3.6.4/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/cli.py", line 2556, in update
do_purge()
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/cli.py", line 1227, in do_purge
dep = convert_deps_from_pip(package)
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/utils.py", line 625, in convert_deps_from_pip
req = get_requirement(dep)
File "/home/omer/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pipenv/utils.py", line 311, in get_requirement
req = [r for r in requirements.parse(dep)][0]
IndexError: list index out of range
Steps to replicate
Run pipenv update
with the following Pipfile:
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
"e1839a8" = {path = ".", editable = true}
[dev-packages]
pytest = "*"
seaworthy = "*"
Notice that the installed package is an editable package.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Errors to use pipenv after updating python version
Running with a new Ubuntu 22.04 system, I faced the same urllib3 collections issue you report as your initial problem: $ pipenv install ......
Read more >snowflake-connector-python - PyPI
... a bug where empty results containing GEOGRAPHY type raised IndexError. v2.7.8(May 28,2022). Updated PyPi documentation link to python specific main page ...
Read more >Common Pipenv Errors - Towards Data Science
When you use pipenv install to get a new dependency, the Pipfile and Pipfile.lock are automatically updated with that new dependency.
Read more >Python Examples of toml.TomlDecodeError - ProgramCreek.com
TomlDecodeError, IndexError) as e: raise RuntimeError('failed to load ... TypeError): print(f"Unable to update {pyproject_file}: file not found.
Read more >Frequently Encountered Pipenv Problems - Read the Docs
☤ An exception is raised during Locking dependencies… ¶. Run pipenv lock --clear and try again. The lock sequence caches results to speed...
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
Lost track of this one. To answer your concerns @carsonyl
pipenv install -e .
andpip install -e .
both callsetup.py develop
which installs the package as whatever it is named in the relevantsetup.py
, therefore you must uninstall it by that name. I would not recommend installing things with this approach if you don’t understand what it does to your environment.As for the above error, it may be fixed in master as a side effect of #1372 when we merge it. We have a number of changes involving requirement parsing there.
#1372 is now merged.