manage.py - ImportError: No module named django

Since you just migrated to a UNIX environment, i suggest you migrate also to the best practices on such a platform too.

  1. Download PIP

    sudo apt-get install python-pip

  2. Download and install virtualenv to set up a separate python virtual environment for your apps. This will allow you to run different flavors of django and other software without conflicts.

    sudo pip install virtualenv

  3. Create virtual environment by running. You will get a folder called myvirtualenvironment with a bin folder and a few executables inside it.

    virtualenv myvirtualenvironment --no-site-packages

  4. In order to tell your shell that you're working with that newly created virtual environment you need to run the activate script found in /myvirtualenvironment/bin/

    source myvirtualenvironment/bin/activate

  5. Now you can install django specifically to that virtual environment.

    pip install django OR pip install django==1.6 depending on what version you want to install. If you don't specify, the latest version will be installed.

  6. Now, migrate your Django project inside of /myvirtualenvironment/ and run the the runserver command.


Sometimes there are some .pyc files in the directories and you don't get any error from the console. Trying to install Django from pip.

sudo pip install django

Best practices advise to create a requirements.txt file (From you Windows installation)

pip freeze > requirements.txt

And then create a new virutalenv to install every package

mkvirtualenv  myapp
pip install -r requirements.txt