After spending a while to solve the PyCharm
ImportError
It's the "Couldn't import Django.
It's caused by me both installing django
and python with apt-get
and python3
Terminal
django-admin --version
1.11.20
PyCharm IDE
django-admin --version
2.2.4
I'm aware the
PYTHONPATH=/path/to/django/parent/dir python
>>> import django
solves the importerror
Do I need to an installation from scratch?
Any package installed with
apt-get install
can be removed withapt-get remove
.Add
--simulate
to check first what will happen before removing the package, try this first:If you are happy with the output, remove those packages with:
That will leave you only with the pip version, that normally is more recent than the apt-get one, if something gets wrong, reinstall that version:
Hope it helps.