I would like to know how to setup a complex python website, that is currently running in production environment, into a local machine for development?
Currently the site uses python combined with Django apps (registration + cms modules) in a virtual environment.
In case you are using
pipfor package management, you can easily recreate the virtualenv on another system:On system1, run
pip freeze --local > requirements.txtand copy that file to system2. Over there, create and activate the virtualenv and usepip install -r requirements.txtto install all packages that were installed in the previous virtualenv.Your python code can be simply copied to the new system; I’d
find -name '*.pyc' -deletethough since you usually do not want to move compiled code (even if it’s just python bytecode) between machines.