× {{alert.msg}} Never ask again
Get notified about new tutorials RECEIVE NEW TUTORIALS

Python Virtual Environments

Feb 09, 2016
<p>It really helps if you already have a virtual environment set up. I know for beginning Python programmers this can be a lot to take in before you *start*. But it will save time eventually, because you can install packages with a single comment.</p> <p> </p> <p>If you have Python installed, you can create a virtual with:</p> <p>$ virtualenv venv</p> <p>And activate it with:</p> <p>$ source venv/bin/activate</p> <p> </p> <p>Now you can install packages with a single command such as:</p> <p>$ pip install requests</p> <p> </p> <p>More information is available here: http://docs.python-guide.org/en/latest/dev/virtualenvs/</p> <p> </p> <p>In particular note that if you have both Python2 and Python3 installed you might want to create the virtualenv with a specific version, something like:</p> <p>$ virtualenv -p /usr/bin/python3 venv</p> <p> </p>
comments powered by Disqus