Pipenv: Any way to force reinstall of package

Created on 11 Sep 2017  路  5Comments  路  Source: pypa/pipenv

I'm running into an issue with psycopg2 which I'm pretty certain is caused by the psotgresql libraries on my host having changed. I can fix the issue by uninstalling and reinstalling the library using pip in the virtualenv. Is there any way to do this directly via pipenv, something like pipenv install --force-reinstall?

Most helpful comment

pipenv clean between the uninstall and install seems to force-remove the cached installation.

All 5 comments

uninstall followed by install will do the trick.

or 'update' which will reinstall all dependencies.

uninstall / install modifies the Pipfile -> not desired

update does not reinstall the package.

It seems pipenv is not a substitute for pip, but must be used alongside pip. Which is a bit unfortunate, since now we need to be proficient in pip and pipenv.

Anyway, thanks for the great work!

It seems pipenv is not a substitute for pip, but must be used alongside pip.

This is, and will always be the case. Pipenv and pip are more like Gir porcelain and plumbing commands; the former provides a nice interface, but cannot possibly covers all use cases (because abstractions are always leaky), and in edge cases you need to do some plumbing yourself.

With that said, it could be a good idea to add a flag to clean to not only clean up unused packages, but also reinstalled others. Or maybe sync can have a flag to pass the ignore-installed to pip.

pipenv clean between the uninstall and install seems to force-remove the cached installation.

Was this page helpful?
0 / 5 - 0 ratings