Last active
August 18, 2016 18:40
-
-
Save sebastialonso/28e60f30ac18499195ea00b1bc80a90f to your computer and use it in GitHub Desktop.
Create a virtualenv with Tornado
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install virtualenv | |
sudo pip install virtualenv | |
# Create the virtual envorinment | |
virtualenv --no-site-package app (# to use python3.5: `-p python3.5`) | |
# Install tornado in the virtual environment | |
app/bin/pip tornado | |
# After that, the following command should show something like tornado-VERSION-.egg | |
ls app/lib/python2.7/site-packages/ | |
# Activeate virtual environment | |
source app/bin/activate | |
# your bash should look modified from this | |
#seba@dradisWork [14:52:53] | |
# to this | |
#(app) seba@dradisWork [14:52:53] | |
# Run the script using in-virtualenv python | |
bin/python2.7 webserver.py | |
=> web-server running | |
# Deactivate virtual environment | |
deactivate | |
# now the modified bash changes to its old self | |
Ref: http://www.programering.com/a/MDN1gDMwATg.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment