Hi,

I'm having problems working with Django-Celery. When I try to run syncdb after adding 'djcelery' to my INSTALLED_APPS, I get an error that reads: "Error: cannot import name current_app".

If I go into the 'django-celery' app directory and try to run

python2.7 setup.py install

on the other hand, the error reads:

The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was:
/home/nbewley/lib/python2.7/
This directory does not currently exist.  Please create it and try again, or choose a different installation directory (using the -d or --install-dir option).

Has anyone else run into this issue? I'm not sure if this will fix this issue, but: How do I change the installation directory when running setup.py install?

Thanks for any suggestions.

asked 25 May '12, 20:39

Nick_B's gravatar image

Nick_B
11211
accept rate: 0%


Don't change the installation directory, create it.

mkdir /home/nbewley/lib/
mkdir /home/nbewley/lib/python2.7/

That is the correct python search path however each version is not created on a new account. Creating the directory will solve the error and prevent future ones.

link

answered 25 May '12, 20:43

johns's gravatar image

johns ♦♦
4.1k28
accept rate: 23%

edited 25 May '12, 20:45

Thanks @johns. I created the directory and successfully ran setup.py. However, I still have the same problem, which is that when I try to run syncdb when django-celery is included in the INSTALLED_APPS, I receive an error that says:

Error: cannot import name current_app

Only when django-celery is included in my settings.py. I believe I correctly installed the django-celery dependencies and modules. Do you have any suggestions? Thanks for your input.

(29 May '12, 18:51) Nick_B Nick_B's gravatar image

It sounds like the application directory isn't being located on your python path. Can you try setting the PYTHONPATH to include the directory which contains current_app (which, I am assuming, is a python package). You then would also want to update your WSGI script to include this same path as well, so that you don't run into ImportErrors when running the application in production.

If this doesn't work, please open a support ticket and indicate the specific steps we can use under your account to reproduce the problem. We can then investigate and update this community Answer with a more accurate assessment and solution.

(29 May '12, 20:56) ryans ♦♦ ryans's gravatar image
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

Tags:

×744
×275
×52
×35

Asked: 25 May '12, 20:39

Seen: 1,038 times

Last updated: 29 May '12, 20:56

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited