stackQA
stackQA

Reputation: 336

Create new pipenv project with imported pipfile

I created a python project that uses pipenv I now want to create a second project and reuse that pipfile from the first project, such that the pipfile of the second project is initialised with the pipfile of the first project. The pipfiles of the two projects may diverge.

I have looked at the pipenv help menus for install and update, and googled about for documentation and answers.

It isn't clear how to import the pipfile. There is a reference to importing a requirements.txt , but I would expect that I wouldn't' have to export the pipfile to a requirements.txt from one project and then import that file into the second project.

How do I import it that pipfile when creating the pipfile for the second project ?

Upvotes: 3

Views: 2056

Answers (1)

Caerwin
Caerwin

Reputation: 71

Just open a terminal in your new project directory, and if it already has a pipfile just type pipenv install If there's no pipfile.lock present a new one will be created with all dependencies, if there is, the pipenv install will use that instead to install all packages.

If you want to also install dev packages, just type pipenv install --dev instead

Upvotes: 1

Related Questions