Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

WebFaction Django Python tips notes

Michael Hulse edited this page Jan 7, 2015 · 30 revisions

Misc. notes working my way through Django/Python dev setup on WebFaction.


Default Python:

Add this to .bash_profile:

# Default Python
# http://docs.webfaction.com/software/python.html#creating-a-python-alias
alias python=python3.4

Reload your changes:

$ source ~/.bash_profile

Python's venv

First, in your home directory, make:

$ mkdir -p ~/.virtualenvs

In your .bash_profile, add this:

# Default pyvenv
alias pyvenv=pyvenv-3.4

Create the environment:

$ pyvenv ~/.virtualenvs/repower

Activate:

$ source ~/.virtualenvs/repower/bin/activate

Deactivate (when activated):

$ deactivate

Note, pip comes with Python 3.4 pyvenv:

$ which pip
~/.virtualenvs/repower/bin/pip

Nice!

To make it quick, add an alias to your .bash_profile:

# Simplify pyvenv activation for "repower" environment:
alias repower='source ~/.virtualenvs/repower/bin/activate'

And then reload:

source ~/.bash_profile 

Now:

$ repower

Clone this wiki locally