-1

I am a bit new to programming and have been learning for a few weeks now. I am following Corey Schafer basic python videos and in the middle of his Django Series. To run the server, I run a virtual env. In cmd (in the project directory) I type:

1-pip shell

2-python manage.py runserver

The server runs and I work on the project.

Not Today. When I wrote pip shell, it gave me an error that: 'pip' is not recognized as an internal or external command, operable program or batch file.

enter image description here

I reinstalled Python after uninstalling it. pip is installed on my system. I added a new variable from the python folder (scripts) in my system. I did not work and it's still showing me the same error.

  • Why did you create a virtual environment though? You wouldn't need one if you're new to programming. – Yılmaz Alpaslan Mar 19 '22 at 19:51
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 20 '22 at 05:10

1 Answers1

1

It could be that you don't put the correct path in your PATH environment variable in window.
Also, in your picture, it looks like you didn't activate your virtualenv, you can see samples from here

.\env\Scripts\activate
Ivan Kwong
  • 381
  • 1
  • 6
  • How do I do that? Do you mean path of my django project? I did the same things that I have been doing for past 2 weeks. – Ali Zain Mar 19 '22 at 19:38
  • To setup path you can ref [here](https://stackoverflow.com/a/23709194/9965384) – Ivan Kwong Mar 19 '22 at 19:50
  • 1
    Please ignore the referenced answer although it has 682 upvotes as it corrupts the __user__ environment variable `Path` and so corrupts all __local__ environment variables `Path`. It is an absolute __NO GO - NEVER EVER__ to use value of __local__ `Path` referenced with `%PATH%` to define __user__ `Path` with command __SETX__ which should be additionally used with care as it does not support values longer than 1024 characters. Click on Windows Start button, type `environment` and click on __Edit environment variables for your account__ to use the GUI to configure __user__ `Path`. – Mofi Mar 20 '22 at 11:52