I have a python on which I've been working on. Now I've realized that I need a virtual environment for it. How can I create it for an existing project? If I do this:
virtualenv venv
will it work fine? Or do I have to re-create my project, create virtualenv and then copy the existing files to it?
You should always create a virtual environment. It's easy to interact with, and it allows you to avoid conflicts between projects. Show activity on this post. Only the python interpreter (executable) and a few things like pip, easy_install are copied to the local directory for your venv project.
You can just create an virtual enviroment with virtualenv venv
and start it with venv/bin/activate
.
You will need to reinstall all dependencies using pip, but the rest should just work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With