Here be some virtualenv commands for my goldfish memory

Dear Nai,

Because you have goldfish memory, here is a blog post to remind yourself of the right commands to use for virtualenv

To create a new virtualenv (and this is assuming you have virtualenv wrapper installed):

mkvirtualenv -p python2.7 –no-site-packages ENV

–no-site-packages starts the virtualenv clean with just python2.7

To list all virtualenvs:

lsvirtualenv

To remove:

rmvirtualenv ENV

Location of virtualenv:

/home/nai/.virtualenvs/

That’s it!

While I’m at it, here are some frequently used pip commands:

pip install -r requirements.txt

pip install –upgrade -r requirements.txt

pip freeze >> requirements.txt

Hang on, how about some db and webserver commands too!

sudo /etc/init.d/postgresql restart

sudo apachectl stop

Advertisements

One thought on “Here be some virtualenv commands for my goldfish memory

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s