I tried to run pipenv update
. It errors.
A complete re-installation of the virtual environment.
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
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.
Hmmm this looks interesting. The expected behavior would just be to reinstall, yes? And there is a setup.py
in the local project root?
The answers are yes and yes :)
I have the same issue on Windows 10, Python 3.6.4, pipenv 9.0.3. pipenv install -e .
breaks pipenv update
as described, and can only be undone by pipenv uninstall [that package name]
.
As an aside, I was surprised that the opposite of pipenv install -e .
is not pipenv uninstall .
.
Lost track of this one. To answer your concerns @carsonyl pipenv install -e .
and pip install -e .
both call setup.py develop
which installs the package as whatever it is named in the relevant setup.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.
Most helpful comment
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.