1

I am trying to migrate from pip to pipenv and have my projects running on a pipenv environment. The steps I'm taking to set up a pipenv environment are listed below:

  1. Create a folder name "Project" & set the dir to "Project"
  2. pip freeze > requirements.txt to create a requirements.txt file containing packages installed under pip environment.
  3. pipenv --python 3.9 to set a specific version of python interpreter to use under pipenv environment
  4. pipenv shell to run pipenv environment
  5. pipenv install -r ./requirements.txt to install packages listed in the requirements.txt

Questions...

Q1. On step 3, I am not sure if I should have executed pipenv install --python 3.9 instead of pipenv --python 3.9. Are they doing the same thing?

Q2. I am also curious why I'm supposed to run step 3 before 4, not after 4. To me, it seems more reasonable to install python version after you're inside the pipenv environment.

Please let me know if the steps above are incorrect or additional steps need to be taken.

user9532692
  • 584
  • 7
  • 28

0 Answers0