Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialPulkit Kumar
2,052 PointsDjango in python3 on mac os
Kenneth i have just started learning django frome the official documents. I work on mac os x and have installed python 3.4.3 on it for your course. So to install django i did a pip3 install django, it did install but when i run a dhanjo-admin command it is giving me an error. Can you please help me with it.
William Li
Courses Plus Student 26,868 PointsPulkit Kumar Can you post the error message here?
2 Answers
William Li
Courses Plus Student 26,868 Pointsummm ... Since I always install django using virtualenv, I'm not familiar at all with installing django via pip3 as system site-packages.
Off the top of my head, I can think of couple of causes for command not found
error.
Run the following command in your terminal
python3 -c "import django; print(django.get_version())"
It should return Django version number; if however it returns an ImportError: No module named 'django'
, that means Django wasn't installed correctly, maybe you should try install it again.
Once you've confirmed that Django is indeed installed properly; another cause for command not found
error is that the django_admin executable isn't on your System Path. However, I do believe that a successful Django installation would place django_admin in your Mac's system path; maybe you just need to re-source/reload your terminal's profile. It can be done by entering this command
source ~/.bash_profile
But I think the easiest way to achieve that is simply restart the Terminal. So try that, see if it fixes the issue.
Pulkit Kumar
2,052 Pointspulkitkumar95 ~ $ django-admin startproject mysite -bash: django-admin: command not found
This is what it is showing
Please can you help me with it
Chris Freeman
Treehouse Moderator 68,441 PointsChris Freeman
Treehouse Moderator 68,441 PointsTagging Kenneth Love.