1

When I run the command via ubuntu 15.04 terminal

celery worker -A celery_blog -l inf -c 5

I always get

Cannot find installed version of python-django or python3-django.

Though I have installed django for python 2.x as well as 3.x, you may refer the attached screenshot also.

enter image description here

Also, why even it's asking for django when running celery worker?

6
  • How did you install Django? If it is in a virtual environment, then you must activate the virtual environment before starting the celery worker. Commented Aug 22, 2016 at 10:18
  • I have installed globally. Commented Aug 22, 2016 at 10:18
  • can you run 'which python-django' or 'which python3-django'? Commented Aug 22, 2016 at 10:29
  • @lapinkoira what you mean by that? Commented Aug 22, 2016 at 10:33
  • If you type on your shell 'which python-django' it tells you where is the application bin located on Commented Aug 22, 2016 at 10:43

2 Answers 2

7

Solution 1:

 pip install Django

Solution 2: ubuntu version > 14.04. python3-django is a package available in the repos for Ubuntu 15.04. It isn't in the default repos for Ubuntu 14.04

apt-get install python3-django
Sign up to request clarification or add additional context in comments.

Comments

1

There are a number of different ways in which you can install Django depending upon your needs and how you want to configure your development environment.

Global Install from Packages:

sudo apt-get update

sudo apt-get install python-django

You can test that the installation was successful by typing:

django-admin --version

Global Install through pip:

sudo apt-get update

Now you can install pip. If you plan on using Python version 2, install using the following commands:

sudo apt-get install python-pip

If, instead, you plan on using Python 3, use this command:

sudo apt-get install python3-pip

Now that you have pip, we can easily install Django. If you are using Python 2, you can type:

sudo pip install django

If you are using Python 3, use the pip3 command instead:

sudo pip3 install django

You can verify that the installation was successful by typing:

django-admin --version

Global Install through pip.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.