Creating a Virtual Environment
Discover how to create and manage isolated Python virtual environments using the virtualenv package. Learn to activate environments, install packages with pip, and utilize key flags for customization. This lesson equips you with the skills to set up reliable project sandboxes for dependency management.
We'll cover the following...
Creating a virtual sandbox with the virtualenv package is quite easy. All you need to do is the following:
Where FOLDER_NAME is the name of the folder that you want your sandbox to go. On my Windows 7 machine, I have C:\Python34\Scripts added to my path so I can just call virtualenv.py FOLDER_NAME without the python part. If you don’t pass it anything, then you’ll get a list of options printed out on your screen. Let’s say we create a project called sandbox. How do we use it? Well, we ...