Reputation: 715
What is the difference between using pipenv install <package>
compared
to using pip install <package>
after activating an environment using pipenv shell
.
I know pipenv install <package>
will
pipenv lock
command automatically.Apart from these, is there any other difference between these two?
Upvotes: 47
Views: 18467
Reputation: 2326
If you are installing using a pipenv environment you should always install your packages using pipenv, this way it will update your pipfile.lock file. Also be careful because pip install <package>
will pretty much work anywhere, it's not installing packages to your virtual environment, it's installing them into your computer. Pipenv will update your Pipfile.lock and actually install into your pipenv virtual enviroment if you have one open.
It's rarely a good idea to pip install <package>
outside of a virtualenv.
Upvotes: 31