Python Forum
Pip apparently installed but unrecognized by CMD
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Pip apparently installed but unrecognized by CMD
#1
Hello, I am an absolute beginner. It's been just one week that I am approaching to Python. I didn't really pick up the meaning of the enviroments but I need time. One question: in my desktop I installed Python by Visual Studio 2017. It works but I am struggling a lot when I want install the packages outside Visual Studio. Googling around I found some code in CMD to use and the result is, py -V Python 3.6.3 pip -V pip is not recognized as internal or external command... py -m ensurepip Requirement already satisfied:setuptools in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\sitepackages
Requirement already satisfied:pip in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\sitepackages

The point is that if I run a pip -m install pyodbc for example it retrieve the error pip not recognised so I must go to Visual Studio, create a new environment (I don't understand why I must create a new one) and install the package. After that I use import sys giving the path of the folder where the package is. Quite annoying.
I added the c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\sitepackages to PATH in the system environment but nothing changed.
Any advice?
Many Thanks
Reply
#2
(Apr-03-2018, 03:50 PM)diegoctn Wrote: Any advice?
Python 3.6 and pip installation under Windows, part-2.
Quote:in my desktop I installed Python by Visual Studio 2017.
I would drop Visual Studio,and use VS Code my quick review i while back.
Reply
#3
Find the location of python.exe on your computer.

There is a subfolder in that folder called Scripts. The folder that contains python.exe and the Scripts Subfolder should both be included in the PATH Environment variable.

Lewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00
Reply
#4
Py.Exe is in C:\Windows and there isn't any folder named scripts.
Reply
#5
I agree with snippsat. Delete Python. Download (if necessary) and install Python per snippsat's link. Follow instructions exactly as per the red arrows. Install pip if necessary. Install VS Code (aka Visual Studio Code).

When you install Python with this method, the PATH Environment variable will automatically be updated.

Lewis
To paraphrase: 'Throw out your dead' code. https://www.youtube.com/watch?v=grbSQ6O6kbs Forward to 1:00
Reply
#6
Thanks guys, but uninstalling would mean that I can't use Python on Visual Studio anymore? I am concern because VS comes with Anaconda and Django too..
Reply
#7
(Apr-04-2018, 08:15 AM)diegoctn Wrote: Thanks guys, but uninstalling would mean that I can't use Python on Visual Studio anymore?
It do not mean that,it would probably find the interpreter automatically,if not you point to correct place yourself(all editors has setup for this).
(Apr-04-2018, 08:15 AM)diegoctn Wrote: I am concern because VS comes with Anaconda and Django too..
What do mean bye this,as fair as i know do not Visual Studio comes with Anaconda or Django.
If download Anaconda: Visual Studio Code is now shipping with Anaconda!

What we advice is to use Visual Studio Code,
just to make it clear Visual Studio Code has nothing to with Visual Studio,it's a stand alone free editor that work on all OS.
Reply
#8
Thanks guys, all of you.
Just one last question, how can I unistall python? It came with VS, as I said, and the only thing I can see is that I've got py.exe in C:\Windows and if I run py -m ensurepip I've got
Requirement already satisfied:setuptools in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\sitepackages
Requirement already satisfied:pip in c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\sitepackages

Sorry, I am just a confused beginner.
Reply
#9
I don,t know if there are separate uninstall of Python that came with Visual Studio.
You can just leave it there and follow my link about install.
Restart and test pip -V.

There is no problem to have several Python version install,
what Windows look in is Environment Variables Path
It easy to change,as you see path to python(not long path) and the Scripts folder(where pip.exe are).
This is what you get it follow install tutorial,If in Path visual studio python remove it.
[Image: lwkZgx.jpg]
There is no magic Environment Variables Path has always been what use Windows use to look for installed stuff.
If in Path it will work from anywhere in cmd.
Reply
#10
"There is no problem to have several Python version installed"
I know that I can have 2.7 and 3.6 in the same machine but can I install 3.6 in a machine that has already it?

Thanks a lot for your advice guys
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  I cannot understand aliases, apparently Mustey 7 2,870 Aug-29-2019, 07:57 AM
Last Post: buran
  os.path.exists apparently doesn't always work! Larz60+ 2 4,858 Oct-10-2017, 10:16 PM
Last Post: sparkz_alot
  error: unrecognized arguments zafar202 2 40,340 Feb-08-2017, 02:50 PM
Last Post: zafar202

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020