Pipenv: Automatic migration of requirements.txt

Created on 30 Jan 2017  路  9Comments  路  Source: pypa/pipenv

Would it make sense to have pipenv install in a project directory ask about installing the packages listed in a requirements.txt (of the pip install -r requirements.txt variety) rather than simply creating an empty pipenv project as it seems to do now?

All 9 comments

I don't think so, you should manually be curating your packages now.

What's the recommended path for someone migrating from requirements.txt to pipenv? To manually go through requirements.txt and type pipenv install x for each? (or maybe a cat | for | ... shell incantation)

yes, or edit the pipfile yourself.

Alritey. Thanks!

requirements.txt should be used as a lockfile, not as a pipfile.

It might be good to mention pipenv's relationship with a requirements.txt setup. To me they're pretty similar/overlapping at first read through the docs. I respect that you have a strong opinion about how this works: it'd be good to have that more up front so those that aren't as familiar can learn more.

@iandees I think you can do a somthing like pipenv install && pipenv run pip install -r requirements.txt.

Yeah, but of course this will not add those dependencies to your Pipfile if that's what you need.

As kindly pointed out by @nateprewitt, the feature to import from requirements.txt has in fact been implemented now.

Was this page helpful?
0 / 5 - 0 ratings