0

I am a beginner web programmer, and I am trying to start learning web app development on Python. I have Python 3.4 and I am using Windows 10. Python works fine when making a game using the pygame modules. Recently, I wanted to try web dev, and so I tried to install Django (along with creating a virtual environment), neither of which I was able to successfully do.

I've already installed pip as shown in the image below.

Pip installed

But for some reason when I enter into Command Prompt this:

C:\Users\Steven>$ pip install Django

I get:

'$' is not recognized as an internal or external command, operable program or batch file.

OR

C:\Users\Steven\>pip install django

I get:

'pip' is not recognized as an internal or external command, operable program, or batch file.

Any kind of help will be greatly appreciated!

ettanany
  • 15,827
  • 5
  • 37
  • 56
Steve D.
  • 286
  • 2
  • 4
  • 17

2 Answers2

0

I also faced this issue on windows and here is what helped me. Before executing these commands please make sure that your system environment variable has C:\Python34\ and C:\Python34\Scripts\. Also my Python version was 2.7.12 and I was using windows 8

First install virtualenv (skip if virtualenv is already installed)

python -m pip install virtualenv

Then move to the directory where you want to create a virtual environment and hit this

virtualenv venv

Activate the virtual environment

venv\Scripts\activate.bat

Install Django

pip install django

This should install django in your virtual environment. Now to start a django project the normal django-admin.py startproject did not work for me. This is what worked for me:

python C:\<PATH-TO-VENV-FOLDER>\Scripts\django-admin.py startproject myproject

Hope this helps :)

Swapnil
  • 2,159
  • 14
  • 28
0
  1. first check if python runs.. python
  2. then install virtual env.. python3 -m venv yourEnv_name
  3. now install django .. pip install django
Shivkumar kondi
  • 5,196
  • 8
  • 28
  • 50