Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run --upgrade with pipenv?

Running (say for numpy) pipenv install --upgrade numpy tries to install --upgrade and numpy instead of normal pip behavior for --upgrade switch.

Is anyone else having this problem?

Edit:

Everyone, stop using pipenv. It's terrible. Use poetry instead.

like image 693
A. Hendry Avatar asked Jun 20 '18 01:06

A. Hendry


People also ask

What does Pipenv update do?

$ pipenv install is used for installing packages into the pipenv virtual environment and updating your Pipfile. The user can provide these additional parameters: --two — Performs the installation in a virtualenv using the system python2 link.

How do you run Pipenv?

To activate the environment, just navigate to your project directory and use pipenv shell to launch a new shell session or use pipenv run <command> to run a command directly.

How do I update Pipfile dependencies?

Record dependencies in Pipfile to manage project packagesAdd a new package dependency by modifying the packages section. pipenv lock — records the new requirements to the Pipfile. lock file. pipenv update — records the new requirements to the Pipfile.

How do I update pip packages?

To update installed packages to the latest version, run pip install with the --upgrade or -U option.


1 Answers

For pipenv use update command , not --upgrade switch. You can update a package with:

pipenv update numpy  

See comments in documentation.

This will also persist new version of package in Pipfile/Pipfile.lock, no manual editing needed. There was a bug with this command under certain scenarios, but hopefully it is fixed now.

like image 152
Evgeny Avatar answered Sep 24 '22 17:09

Evgeny