Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What path to install Python 3.6 to on Windows?

The 3.6 installer suggests C:\Users\MyUserName\AppData\Local\Programs\Python\Python36-32 which is unlike any other software on Windows. I remember that earlier versions installed to C:\PythonXY which is also unusual on Windows. Is any of that really a good idea?

In particular, I don't see why I would want to install this only for my user account. The checkbox "Install launcher for all users (recommended)" is default checked which seems incompatible with installing into %APPDATA%.

What is a good path to install Python to?

I'm a complete Python amateur and I don't want to cause myself problems. I am fearful of adding a space to the path for example.


Clicking further through the installer it turns out there is a checkbox to install for all users. This immediately sets a Program Files (x86) based path to the checkbox.

enter image description here

like image 770
boot4life Avatar asked Jun 25 '17 19:06

boot4life


People also ask

Where is Python installation folder in Windows?

py installed location is C:\Windows\py.exe if installed for all users, otherwise can be found at C:\Users\username\AppData\Local\Programs\Python\Launcher .

How do I install Python 3.6 on Windows?

To download the setup file for python 3.6, go to python's official website and click on Python 3.6. 4 under Downloads in the menu bar. Or, you can directly click on the link below to download the setup file. You can also search for IDLE and run python commands via.

What path should Python be in?

The paths that you will need to get are the Python application path, which is the folder where you originally installed Python and the Python Scripts path. The Scripts folder should be located within the Python application path. You may have to reinstall Python if you can't locate your Python path.


2 Answers

This is a very subjective question in most cases, I'm not really sure if its even fit for SO.

Here are the different characteristics of each path:

C:\PythonXY:

  • Requires administrator rights
  • All users have access to it - better if you want only one install of a python version on your system
  • More practical to write in command line (might be needed for multiple python installs, although using venvs or conda envs solves this problem)
  • Program Files is the same, except that there are spaces in the path (probably a bad idea)

AppData:

  • Doesn't require administrator rights
  • Only for one user - good if the other users don't want/need it
  • Might be painful to write in command line

I have admin rights and am the only user on my computer, so I chose the first option, but it really is case-dependent.

EDIT Please see the comments below for rectifications on paths.

like image 151
TrakJohnson Avatar answered Sep 20 '22 14:09

TrakJohnson


Installing Python in c:\Program Files\ in 64-bit Windows 10 has problems because of the new "security features" of Windows 10. Subfolders of c:\Programs Files\ have restricted permissions on them which are not compatible with the installation processes for some Python packages. Installing in a directory directly below the root (for example c:\Python36\ for Python 3.6) avoids these problems. It may be "less secure", but it actually works, which installing under c:\Program Files\ sometimes does not. For example, I have found that if you try to install the matplotlib package in Python 3.7 installed under c:\Program Files\, some of the packages that matplotlib is dependent on are blocked from installing, and the package will not run, but if it is installed in c:\Python37\, it runs fine. Another example of overly enthusiastic Microsoft "security."

Installing in the %appdata% folder for a single user is fine if you are the only person who is going to be using Python, but if your computer is going to be used by another user (for example, if it is a work computer which will be "inherited" by a new employee that takes over your position), Python (and all necessary Python packages) would have to be reinstalled for that user.

like image 35
JDMorganArkansas Avatar answered Sep 16 '22 14:09

JDMorganArkansas