Getting Django for Python 3 Started for Mac django-admin not working
Question:
I have been trying to set up Django for Python 3 for for 2 days now. I have installed python 3.5.2 on my Mac Mini. I have also have pip3 installed succesfully. I have installed Django using pip3 install Django
. The problem is that when I try to start my project by typing django-admin startproject mysite
, I get the error -bash: django-admin: command not found
. If you need any more info, just let me know, I am also new to Mac so I may be missing something simple. How do I get django-admin working? I have tried pretty much everything I could find on the web.
Answers:
Activate virtualenv
and install Django there
python -m pip install django
Try
python -m django startproject mysite
You can use python -m django
instead of django-admin
since Django 1.9.
I am using macport to install python3 and using pip to install Django
python3 -m django startproject mysite
Create venv at first.
python3 -m venv venv
. venv/bin/activate
pip install django
django-admin version
-
make sure the virtual environment is activated, e.g. source venv/bin/activate
where "venv" is the name of your virtual environment.
-
install django IN this venv — if you did not do yet
-
run with e.g. django-admin version
or python3 -m django startproject ecommerce
I have been trying to set up Django for Python 3 for for 2 days now. I have installed python 3.5.2 on my Mac Mini. I have also have pip3 installed succesfully. I have installed Django using pip3 install Django
. The problem is that when I try to start my project by typing django-admin startproject mysite
, I get the error -bash: django-admin: command not found
. If you need any more info, just let me know, I am also new to Mac so I may be missing something simple. How do I get django-admin working? I have tried pretty much everything I could find on the web.
Activate virtualenv
and install Django there
python -m pip install django
Try
python -m django startproject mysite
You can use python -m django
instead of django-admin
since Django 1.9.
I am using macport to install python3 and using pip to install Django
python3 -m django startproject mysite
Create venv at first.
python3 -m venv venv
. venv/bin/activate
pip install django
django-admin version
-
make sure the virtual environment is activated, e.g.
source venv/bin/activate
where "venv" is the name of your virtual environment. -
install django IN this venv — if you did not do yet
-
run with e.g.
django-admin version
orpython3 -m django startproject ecommerce