Summary
This is a collection page of frequent hit problems of Django on Linux. The version of Python is 3.5.2.
Problems
ImportError
Problem:
ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
Django should be run in Python Virtual Environment. So just download python-virtualenv.
The full progress of Django starting on Debian / Ubuntu is
#install python pip
sudo apt-get install python-pip
#install python virtualenv
sudo apt-get install python-virtualenv
# create virtual env
virtualenv myenv
#activate the virtualenv
. myenv/bin/activate
#install django inside virtualenv
pip install django
#create a new django project
django-admin.py startproject NewDjangoProject
#enter to the folder of the new django project
cd NewDjangoProject
#run the django project
python manage.py runserver 0.0.0.0:8000
Then go to 127.0.0.0:8000 to see if Django can work.