WebFaction
Community site: login faq

I can't run manage.py because when i cd into my project folder, it seems as if django is not on my python path. My project folder is symlinked to a directory out of the webapps directory, so this might be an issue -- but I can't seem to find a way to run the proper version of python with the proper path. Tips?

~/releases/X/project_name #project source really lives here
~/webapps/django/project_name -> ../../releases/X/project_name #can't run manage.py

asked 28 Aug '11, 19:36

Brian D
335
accept rate: 0%


The problem here is that our Python site customizations (which put your ~/webapps/whatever/lib/pythonX.Y directory on the Python search path) will only work their magic if your current working directory is at or below ~/webapps.

You can work around it by setting your Python search path at the command line, eg:

export PYTHONPATH=$HOME/webapps/django/lib/python2.7

Or, you could open a separate terminal and run your management commands from ~/webapps/django/project_name while working with your project files under the symlink directory in a different terminal.

Hope that helps!

permanent link

answered 28 Aug '11, 19:51

seanf
12.2k41836
accept rate: 37%

edited 28 Aug '11, 23:57

That's just what I needed. I'm running 2.6, so I just put that in my .bash_profile and all is well. Thanks seanf!

(28 Aug '11, 22:56) Brian D
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
×337
×15

question asked: 28 Aug '11, 19:36

question was seen: 2,600 times

last updated: 28 Aug '11, 23:57

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