1👍
✅
You should import django
, not Django
, watch the case.
Demo:
$ pip install django
Requirement already satisfied (use --upgrade to upgrade): django in ...
Cleaning up...
$ python
Python 2.7.5 (default, Aug 25 2013, 00:04:04)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import Django
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named Django
>>> import django
>>>
0👍
I couldn’t fix the $PATH conflict between my OSX default version (2.7.10) and my pip installed one (3.8). Instead, I manually specify the entire path when calling django-admin
:
Go to your project folder in console and type (check your version first).
your_proyect_folder$ python3 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/django/bin/django-admin.py startproject your_folder_name
- [Answer]-How to have a multiple select field in django in the form of a drop down box
- [Answer]-How to get the ip address who are accessing my website using django for python
- [Answer]-How to deploy mid sized Django App
- [Answer]-Django Social Auth redirect to url with Port number
- [Answer]-How to avoid MySQL warning to be escalated to an Exception in a Django application
Source:stackexchange.com