WebFaction
Community site: login faq

I've reviewed some of the other questions about using virtualenv with django projects on webfaction, and I wanted to try something different. I was wondering if anyone might have any warnings or tips.

all the other examples I can find use

WORKON_HOME=$HOME/.virtualenvs

can I simply use?

WORKON_HOME=$HOME/webapps

and if I do, and I create an app (myapp) using the control panel, can't I simply use this to create a virtualenv for my new app?

mkvirtualenv myapp

one discrepancy I've noticed is that on webfaction django apps, django is installed under ~/webapps/myapp/lib/pythonX.X/django whereas if I installed django with virtualenv and pip it should endup in ~/webapps/myapp/lib/pythonX.X/site-packages/django

asked 05 Jan '13, 12:22

beng
32
accept rate: 0%


Q: Can I simply use?

WORKON_HOME=$HOME/webapps

A: No, that is not a virtualenv directory, nor is it a directory you can write to, it would not work. 'webapps' is meant to only contain webapps, it is owned by root for this reason. You can put your virtualenv within one of the application directories, mine are normally located in,

$HOME/webapps/<NAME OF APPLICATION>/venv

Q: can't I simply use this to create a virtualenv for my new app?

mkvirtualenv myapp

A: You would use the standard virtualenv tools, but you have do change directory to where you want it, as stated above I keep them in the app directory, but you can create them anyplace within your home directory.

You can also install python modules in a number of places as python search path cascades and can read from more than 1 directory.

permanent link

answered 05 Jan '13, 17:10

johns
5.4k312
accept rate: 23%

edited 05 Jan '13, 17:11

thanks johns!

(06 Jan '13, 22:26) beng
Your answer
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

Question tags:

×909
×55

question asked: 05 Jan '13, 12:22

question was seen: 2,431 times

last updated: 06 Jan '13, 22:26

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM