I had Python 2.7 in my system by default, and I installed it and also installed Django 1.11 with it. Now I want to upgrade to a newer version of both and in order to do so, I accidentally deleted Django from usr/local/lib/python2.7. I'm not sure if the problem is because of this. Here are the errors that keep showing up:
When I tried to remove the old version of Django:
$ python -c "import django; print(django.__path__)" Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named 'django'When I check the Django version installed
$ python3 -m django --version /usr/local/bin/python3: No module named djangoBy doing
pip freezepip freeze Brlapi==0.6.1 Django==1.8
I really want to learn Django, can you please help me with this installation?
Installing with pip system wide is usually considered an anti pattern. You should really use virtualenv, you can a short introduction to virtualenv here: http://docs.python-guide.org/en/latest/dev/virtualenvs/
Back to your problem you seem to not know that python and python3 are two separated implementation, thus what you installed with one is not seen by other. Try anyway reinstalling django with
For python3 the related pip should be called something like pip3.