31

I have an existing Python django Project running in Web Server. Now the client needs to make some changes in the existing code. So I need to set it up in my Local Machine. All the packages needed for this project is installed in a Virtual environment. How can I copy or clone this virtual environment to my Local machine to run this Project.

skolima
  • 31,963
  • 27
  • 115
  • 151
Jubin Thomas
  • 1,003
  • 2
  • 12
  • 24

2 Answers2

53
  1. Run pip freeze > requirements.txt on the remote machine
  2. Copy that requirements.txt file to your local machine
  3. In your local virtual environment, run pip install -r requirements.txt

And, so long as all of the requirements are well behaved Python packages, you should be good to go.

David Wolever
  • 148,955
  • 89
  • 346
  • 502
2

Please using Freeze command and you will get text file with all the versions of packages. Then install them using easy install or pip install

Abin Abraham
  • 497
  • 2
  • 11
  • 26