WebFaction
Community site: login faq

Hi,

When I run manage.py command with django in a gnu screen window, I always happen to get

ImportError: No module named django.core.management

Is there any gotcha with screen that I should know of that triggers this behavior?

asked 16 Mar '11, 12:42

amateur
1111416
accept rate: 0%


How are you running manage.py? Are you specifying the python version?

$ python2.7 manage.py

On Cent OS 'python' means python2.4 unless otherwise specified, and our Django installers use 2.7 currently. You may specify the python version by following this documentation,

http://docs.webfaction.com/software/python.html#choosing-a-default-python-version
permanent link

answered 16 Mar '11, 13:29

johns
5.4k412
accept rate: 23%

@johns, I am using just 'python'.... with the same command 'python manage.py runserver"' it works if i'm not inside screen....

(16 Mar '11, 15:03) amateur

If you just run python in screen, is it the same version of Python that you get when you run python outside of screen?

(16 Mar '11, 15:30) seanf

right u guys are right inside screen, its running python 2.4. Outside screen, its running 2.6.5.

(16 Mar '11, 21:23) amateur

The above answer appears to be correct. Both:

./manage.py

and

python ./manage.py

Give the error you indicated. Running:

python2.7 ./manage.py

Works correctly and the command outputs the help info for manage.py.

PS - I'd upvote and comment on the above answer but I don't have enough reputation points or something to do so...

permanent link

answered 16 Mar '11, 21:26

SwitchBlade
525
accept rate: 0%

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:

×910
×14
×4

question asked: 16 Mar '11, 12:42

question was seen: 4,150 times

last updated: 16 Mar '11, 21:26

                              
WEBFACTION
REACH US
SUPPORT
LEGAL
© COPYRIGHT 2003-2020 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