简体   繁体   中英

Error : The program 'django-admin' is currently not installed

But it is installed, coz when I run

python -m django --version

it shows

1.10.1 .

But when I try to start some project django-admin startproject mysite or check the version with django-admin --version , it shows

The program 'django-admin' is currently not installed. You can install it by typing:
sudo apt-get install python-django`

I'm using ubuntu 14.04. I'm new to django, I was just trying to follow some tutorial to learn it and faced this issue.

Reinstall django:

sudo apt-get purge python-django    
sudo pip uninstall django
sudo apt-get install python-django
sudo pip install django --upgrade

Also you can use virtualenv and virtualenvwrapper to have a better package isolation for multiple projects.

Run this command: sudo easy_install django
It will create a file named django-admin at /usr/local/bin
Then, you can run the following command successfully: django-admin startproject mysite

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM