I installed django on my mac but i couldn't run my project as because this issue:
ModuleNotFoundError: No module named 'django'
I don't know about this, The problem is i couldn't import django on my system but tried this way too...
(my_project) my_project % python
Python 3.6.8 (v3.6.8:3c6b436a57, Dec 24 2018, 02:04:31)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.path)
['', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python36.zip', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/lib-dynload', '/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages']
>>> import django
>>>
It's all fine, But i dont no the problem where is?
CodePudding user response:
You should look at the pip list
See if you have Django
CodePudding user response:
This happens if you have many python versions on your Mac, for example the Python version in your virtualenv is different from the default version of python.
Maybe you downloaded the django framework to other version.