I'm learning Python in tandem with Django. I initially installed Python 3 on my machine, but read about possible conflicts and removed it with some difficulty.
Now I'm using virtualenv and installed python3 within the env and Django using pip. Django and Python seem to have installed correctly:
# python -c "import django; print(django.get_version())"
1.9.1
# python -V
Python 3.2.3`
but when I try to start a new Django project, I get the following:
# django-admin.py startproject mysite
Traceback (most recent call last):
File "/home/niroj/Projects/webenv/bin/django-admin.py", line 2, in <module>
from django.core import management
File "/home/niroj/Projects/webenv/lib/python3.2/site-packages/django/core/management/__init__.py", line 10, in <module>
from django.apps import apps
File "/home/niroj/Projects/webenv/lib/python3.2/site-packages/django/apps/__init__.py", line 1, in <module>
from .config import AppConfig
File "/home/niroj/Projects/webenv/lib/python3.2/site-packages/django/apps/config.py", line 6, in <module>
from django.utils.module_loading import module_has_submodule
File "/home/niroj/Projects/webenv/lib/python3.2/site-packages/django/utils/module_loading.py", line 67, in <module>
from importlib.util import find_spec as importlib_find
ImportError: cannot import name find_spec
What should I do?