Professional Documents
Culture Documents
Personal
Open source
Business
Explore
Pricing
Blog
Support
This repository
stanfordpython / python-handouts
Code
Branch: master
Issues 0
Pull requests 0
Sign in
Search
Watch
Pulse
Star
Sign up
Fork
Graphs
python-handouts / virtualenv.md
Find le
Copy path
2 contributors
46lines(24sloc) 2.67KB
Raw
Blame
History
Virtual Environments
What is a virtual environment?
A virtual environment is simply an isolated folder that contains all the executables you need to build something awesome in
Python, including code to run the interpreter, use the standard library (https://docs.python.org/3.4/library/), and install other
3rd-party libraries that we'll touch on towards the end of the quarter.
$pipinstallvirtualenv
this uses pip to install the software used to build your virtual environments, called virtualenv
https://github.com/stanfordpython/python-handouts/blob/master/virtualenv.md
1/2
4/1/2016
$virtualenvcs41
this uses virtualenv to create a new virtual environment in the working directory named cs41. you should be able to see this
folder on your Desktop now.
$sourcebin/activate
Now you can play with the interactive interpreter inside your isolated environment using
$python3
You can also create new les, modules, whatever you need to make a beautiful Python project ready to ship! To deactivate,
type
$deactivate
All done! If you want to read more about the above steps, check out http://docs.python-guide.org/en/latest/dev/virtualenvs/
If you want to read about the interactive interpreter, check out http://www.python-course.eu/python3_interactive.php
Terms
Privacy
Security
https://github.com/stanfordpython/python-handouts/blob/master/virtualenv.md
Contact
Help
Status
API
Training
Shop
Blog
About
2/2