问题
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?
回答1:
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.
回答2:
I've got ⠙WARNING: Invalid requirement, parse error at "'--upgrad'"
though. I think you just need to update Pipfile
with numpy = "*"
. Then, run pipenv install
again.
回答3:
Pipenv
is not meant to be a global and changing package manager like pip
. It is a tool to keep several frozen environments per directory. It is a tool build on top of virtualenv
and pip
to create reproducible environments to share with others during development or future you.
If you want to "unfreeze" your environment you can either change the version of numpy in your Pipfile
manually to the new desired version.
E.g.
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
numpy = "1.14.4" # change this line to 1.14.5 or whatever version you want
[dev-packages]
or run
pipenv install --selective-upgrade numpy
来源:https://stackoverflow.com/questions/50939006/running-upgrade-with-pipenv