[Answer]-Installed Django but import not possible

1๐Ÿ‘

โœ…

As i said on irc,

You are running pip install as root. More than that, sudo will reset the environment before finding and running pip. This will mean your pip install is not into the virtualenv that travis provides, but into the global site-packages.

When you do python manage.py test you are using the python binary provided by a virtualenv. However virtualenv will not look in the system site-packages. So it cannot see the Django you installed into the system site-packages.

๐Ÿ‘คJc2k

Leave a comment