1

Getting error:"ImportError: No module named functional" in while using virtualenv

I am trying to install askbot using virtualenv but whenever I am trying the command python manage.py syncdb,I am getting a error as shown below. I install celery and django-celery package using the commands,pip install -E site django-celery,pip install -E site celery, but it did not help. so how to install this module functional?

(site)[sayan@fedora forum]$ python manage.py syncdb
Traceback (most recent call last):
  File "manage.py", line 11, in <module>
    execute_manager(settings)
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/core/management/__init__.py", line 379, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/core/management/base.py", line 219, in execute
    self.validate()
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/core/management/base.py", line 249, in validate
    num_errors = get_validation_errors(s, app)
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/core/management/validation.py", line 36, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/db/models/loading.py", line 146, in get_app_errors
    self._populate()
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/db/models/loading.py", line 64, in _populate
    self.load_app(app_name)
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/db/models/loading.py", line 78, in load_app
    models = import_module('.models', app_name)
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django_celery-2.2.3-py2.7.egg/djcelery/models.py", line 18, in <module>
    from djcelery.managers import TaskManager, TaskSetManager, ExtendedManager
  File "/home/sayan/Development/mether/site/lib/python2.7/site-packages/django_celery-2.2.3-py2.7.egg/djcelery/managers.py", line 6, in <module>
    from celery.utils.functional import wraps
ImportError: No module named functional
sayanchowdhury's avatar
53
sayanchowdhury
updated 2011-08-16 11:10:38 -0500, asked 2011-08-16 11:06:20 -0500
edit flag offensive 0 remove flag close merge delete

Comments

What is your version of django and askbot. I think I've fixed this error recently, but will take a look again.
Evgeny's avatar Evgeny (2011-08-16 11:11:51 -0500) edit
It may be a problem with Celery actually.
Evgeny's avatar Evgeny (2011-08-16 11:12:21 -0500) edit
add a comment see more comments

1 Answer

0

Try removing django-celery from your system, including anything in the /build directory within your python path, then install it again.

pip install django-celery==2.2.7

There were a few updates of the celery library recently in just a few past days. Something may not be right there.

Evgeny's avatar
13.2k
Evgeny
answered 2011-08-16 11:17:06 -0500
edit flag offensive 0 remove flag delete link

Comments

pip uninstall django-celery might just work, but I notice that sometimes pip will take a cached version from the build directory (I have this issue on my mac) then I cannot easily downgrade libraries.
Evgeny's avatar Evgeny (2011-08-16 11:19:08 -0500) edit
I.e. -try a specific version of celery.
Evgeny's avatar Evgeny (2011-08-16 11:34:29 -0500) edit
thanks Evgeny, pip install -E site django-celery==2.2.7 did the job.
sayanchowdhury's avatar sayanchowdhury (2011-08-16 12:45:02 -0500) edit
Great, the dependencies should actually satisfy automatically, if you use "official" methods of installation, described in the manual. If you have issues with those - we will improve the startup tests so that future installations are easier.
Evgeny's avatar Evgeny (2011-08-16 12:48:56 -0500) edit
there is no issues with the "official" methods.
sayanchowdhury's avatar sayanchowdhury (2011-08-17 01:49:00 -0500) edit
add a comment see more comments