Join 1M+ other developers and:
- Get help and share knowledge in Q&A
- Subscribe to topics of interest
- Get courses & tools that help you grow as a developer or small business owner
Can't run a Django console after installing a new version of Python
After uploading to a droplet a Django project I realized that I was using new functionality like f’ strings that aren’t supported on the 3.5 I proceed to install Python 3.6.3.
It looks like the installation is successful. When I write “python3 -V” on the console it answers back Python 3.6.3.
When typing “pip freeze” it appears Django==2.0.4 .
The problem comes when typing “python3 manage.py makemigrations” I got this error:
Traceback (most recent call last): File "manage.py", line 8, in <module> from django.core.management import execute_from_command_line ModuleNotFoundError: No module named 'django' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 14, in <module> ) from exc ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
Any ideas about how to make this work?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.×