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 trialRamkumar R
4,688 PointsCould not start a django project
- Installed django with cmd pip install django
when i try to start project using cmd "django-admin startproject exampleProject" throws error Cannot find installed version of python-django or python3-django.
when try to run this cmd django-admin --version throws the above same error
I'm using ubuntu15.10 and python2
4 Answers
Ramkumar R
4,688 PointsAt last getting started with django project, my steps here maybe useful for someothers
I just start from the first
- create a new virtual environment using "python3 -m venv django_env"
- activate the virtual environment using "source django_env/bin/activate"
- upgrade pip using "pip install --upgrade pip"
- To install django "pip install django~=1.10.0"
- To verfiy django installation "dango-admin --version"
- To start project "django-admin startproject django_basics"
- Create a project folder for me to check get into project folder
- do cmd "python manage.py runsever 0.0.0.0:8080" server gets started.
Thank you max once again.
Unsubscribed User
8,838 PointsFirstly, have a go at installing Django with Python3.
Try sudo pip3 install django.
If that doesn't work, then try sudo easy_install --upgrade django
Otherwise, have a go at python3 -c "import django; print(django.get_version())" and tell me what it says.
Ramkumar R
4,688 PointsThanks for your reply,
when i activate python3 and do import and then print version with above syntax gave me 1.10.5.
But without activating python3 do cmd as django-admin --version gave me Cannot find installed version of python-django or python3-django.
Unsubscribed User
8,838 PointsTry running sudo apt-get python3-django
Ramkumar R
4,688 PointsUsing above cmd shows err as "E: Invalid operation python3-django".
I followed following steps to get start a new django project, I'm not sure the steps are correct I'll put the steps here correct me if i did something wrong.
- Create a virtual env and get into that
- Install django using "pip3 install django"
- if i do cmd django-admin --version or django-admin startproject projectname throws error as "django-admin" not installed so i decide to install in main machine
- in main machine did the same cmd pip3 install django,
- After that overcome the error come at step-3 using sudo apt-get install django-common
- In Next try, facing the err as "Cannot find installed version of python-django or python3-django"