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 trial

Python

Could 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

At last getting started with django project, my steps here maybe useful for someothers

I just start from the first

  1. create a new virtual environment using "python3 -m venv django_env"
  2. activate the virtual environment using "source django_env/bin/activate"
  3. upgrade pip using "pip install --upgrade pip"
  4. To install django "pip install django~=1.10.0"
  5. To verfiy django installation "dango-admin --version"
  6. To start project "django-admin startproject django_basics"
  7. Create a project folder for me to check get into project folder
  8. do cmd "python manage.py runsever 0.0.0.0:8080" server gets started.

Thank you max once again.

Firstly, 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.

Thanks 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.

Try running sudo apt-get python3-django

Using 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.

  1. Create a virtual env and get into that
  2. Install django using "pip3 install django"
  3. 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
  4. in main machine did the same cmd pip3 install django,
  5. After that overcome the error come at step-3 using sudo apt-get install django-common
  6. In Next try, facing the err as "Cannot find installed version of python-django or python3-django"