First time here? Check out the FAQ!
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

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
sayanchowdhury's avatar
53
sayanchowdhury
updated 13 years ago, asked 13 years ago

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 (13 years ago)
It may be a problem with Celery actually.
Evgeny's avatar Evgeny (13 years ago)
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.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 13 years ago
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 (13 years ago)
I.e. -try a specific version of celery.
Evgeny's avatar Evgeny (13 years ago)
thanks Evgeny, pip install -E site django-celery==2.2.7 did the job.
sayanchowdhury's avatar sayanchowdhury (13 years ago)
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 (13 years ago)
there is no issues with the "official" methods.
sayanchowdhury's avatar sayanchowdhury (13 years ago)
see more comments