0
1

I need really basic information, so I will put some notes out for others like me.

http://www.doughellmann.com/docs/virtualenvwrapper/install.html

http://docs.webfaction.com/software/python.html#installing-packages-with-pip

http://www.doughellmann.com/docs/virtualenvwrapper/

I suppose the first thing to do is modify $HOME/.bash_profile

add

alias python=python2.6

This defaults SSH sessions to a reasonable python version. I am oriented towards django and it would be reasonable to consider python2.7, but that is not supported for django at webfaction.

export WORKON_HOME=$HOME/websites

source $HOME/bin/virtualenvwrapper.sh

we are trying to specify where the environments will go. websites is going to be automatically created with your account at webfaction. Note though that we have not necessarily installed virtualenvwrapper yet.

now we save .bash_profile and then execute source ~/.bash_profile

which runs the profile

execute

python and see if the version is 2.6

control-D to get out of python

I forget but maybe

easy_install pip

pip install virtualenv

pip install virtualenvwrapper

source ~/.bash_profile

So let us assume you have decided on the name of the environment: myenv

mkvirtualenv --no-site-packages myenv

This should actually work, because you want python 2.6 installed in the environment and that is the SSH default python version, so we can hope. Otherwise you need an option like -p python2.6 which is passed to virtualenv and applied there.

Since I am trying to avoid versioning problems, it makes sense to me to keep all the dependenies under my control and thus --no-site-packages.

You are now in the myenv environment in a substantial way.

At this point you can pip as you wish. For instance,

pip install django

This actually ends up in your environment even though your current directory might seem wrong. And to make your current directory "right":

cdvirtualenv

So, it is probably good if you pick the above apart, but not in such detail that it confuses.

asked 08 Feb '11, 19:50

astar's gravatar image

astar
15
accept rate: 0%

edited 08 Feb '11, 19:59

Thanks for the walk through!

(08 Feb '11, 19:54) klynton klynton's gravatar image
Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×744
×275
×4

Asked: 08 Feb '11, 19:50

Seen: 1,717 times

Last updated: 08 Feb '11, 19:59

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited