This repository was archived by the owner on Nov 22, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
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.
Add this to .bash_profile:
# Default Python
# http://docs.webfaction.com/software/python.html#creating-a-python-alias
alias python=python3.4Reload your changes:
$ source ~/.bash_profileFirst, in your home directory, make:
$ mkdir -p ~/.virtualenvsIn your .bash_profile, add this:
# Default pyvenv
alias pyvenv=pyvenv-3.4Create the environment:
$ pyvenv ~/.virtualenvs/repowerActivate:
$ source ~/.virtualenvs/repower/bin/activateDeactivate (when activated):
$ deactivateNote, pip comes with Python 3.4 pyvenv:
$ which pip
~/.virtualenvs/repower/bin/pipNice!
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:
$ repowerNow you can use pip (in the venv) to install dependencies/packages.
Do this:
$ ssh-keygen
# No pass (or do, if you want)
$ chmod 644 ~/.ssh/id_rsa.pub
$ ssh-agent bash
$ ssh-addNow we need to add the public key to BitBucket
- Log in to Bitbucket.
- Click on your user icon and choose ‘Manage account‘ tab
- Under the ‘SSH keys‘ pane, do one of the following:
- Copy and paste
cat ~/.ssh/id_rsa.pub | pbcopythe text from your public key file (~/.ssh/id_rsa.pub) into the text input box and click the ‘Add key’ button, or … - Click the ‘Choose File‘ button, browse to your public key, then click the ‘Upload key‘ button
- Copy and paste