WebFaction
Community site: login faq

Doesn't seem to be the correct version of python. How can I ensure that I'm on the right PATH?

@daily python ~/webapps/django/myproj/manage.py update_index --settings=settings_prod

yields

Traceback (most recent call last):
 File "/home/myhome/webapps/django/myproj/manage.py", line 2, in ?
   from django.core.management import execute_manager
ImportError: No module named django.core.management

asked 28 Sep '11, 23:50

Brian D
335
accept rate: 0%

edited 28 Sep '11, 23:50


You can add your path using the environment variable PYTHONPATH.

You alos need to use the correct Python version and full paths.

So, the correct crontabline would be:

@daily PYTHONPATH=/home/username/webapps/django/lib/pythonX.Y /usr/local/bin/pythonX.Y ~/webapps/django/myproj/manage.py update_index --settings=settings_prod
permanent link

answered 29 Sep '11, 00:06

neeravk
1.5k3412
accept rate: 41%

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
×50

question asked: 28 Sep '11, 23:50

question was seen: 5,073 times

last updated: 29 Sep '11, 00:06

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