I've got a lot of projects using the virtualenv
and requirements.txt
or ./requirements/
pattern, but now using pipenv
is obviously many times superior.
It seems to be easy to generate requirements.txt
from pipenv
, but going the other way seems more confusing.
There doesn't seem to be an obvious way to "convert" existing projects to pipenv
.
I'm writing a script to execute pipenv
on everything in a large requirements.txt
but this can't be right -- is there a way to apply an existing requirements.txt to a pipenv
?
How to Create Virtual Environments. If you are working with your personal projects and not installing pipenv, I recommend installing pyenv-virtualenv. If you are working in a team or with more than one system, I recommend you to install pipenv which I am covering next.
While pip can install Python packages, Pipenv is recommended as it's a higher-level tool that simplifies dependency management for common use cases.
OK, I figured out to answer my own question and think there's potential for an "official"/detailed way of doing this:
$ pipenv shell
(env) $ pip install -r requirements
Also this exists now: https://pipenv.kennethreitz.org/en/latest/basics/#importing-from-requirements-txt
$ pipenv install -r path/to/requirements.txt
Really I'd just misunderstood the levels of abstraction of pipenv
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With