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
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
Py.Exe is in C:\Windows and there isn't any folder named scripts.
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
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..
(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.
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.
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.
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
.
"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