This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Windows installer does not add \Scripts folder to the path
Type: enhancement Stage: resolved
Components: Installation, Windows Versions: Python 3.2, Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: Windows installer should add Python and Scripts directories to the PATH environment variable
View: 3561
Assigned To: Nosy List: Dude-X, brian.curtin, eric.araujo, jaraco, piotr.dobrogost, srid, ssbarnea
Priority: normal Keywords:

Created on 2009-10-28 16:59 by ssbarnea, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (11)
msg94633 - (view) Author: Sorin Sbarnea (ssbarnea) * Date: 2009-10-28 16:59
I observed that Windows installer is able to add only the Python
installation folder to the path. 

In addition to this it should add the Scrips folder because many python
tools are installing scripts inside it, scripts that the user cannot us
unless he add this directory to the path. 

This is very annoying because if you modify the PATH you need to
logout/login in order to be able to use the new PATH value.
msg95409 - (view) Author: Isaul Vargas (Dude-X) Date: 2009-11-18 02:07
For now you can modify the path yourself, and only once, by following 
these instructions:
1) Open the System Properties either via the Control Panel or pressing 
WinKey-Pause
2) Click on the tab that says Advanced
3) Click on Environment Variables
4) Under System Variables, scroll down and find Path
5) Click on Edit
6) Add ;X:/PythonXX/Scripts where X is the appropriate drive letter and 
python version.
7) Click OK, and OK again.

You might have to reboot, but now that it is added, you don't have to 
manually update it.
msg95414 - (view) Author: Sorin Sbarnea (ssbarnea) * Date: 2009-11-18 08:40
Thanks Isaul,
Anyway I made the required change before submitting the bug first time
and additionally to what you wrote it is enough to logout/login to
update the path - no reboot required.

The bug is about repairing/improving Python experience for all Windows
users. Imagine that you want to deploy Python plus some extensions to
many Windows computers - you will have a hard time adding Script
directory to the path.
msg110264 - (view) Author: Sorin Sbarnea (ssbarnea) * Date: 2010-07-14 10:54
Additional information that will enable the installer to update the path without requiring a relogin/restart: http://support.microsoft.com/kb/104011
msg115454 - (view) Author: Jason R. Coombs (jaraco) * (Python committer) Date: 2010-09-03 14:07
The big problem with adding the %python%\scripts directory to the path is it makes a lot of assumptions about how Python is deployed.

And it raises some questions. What should the precedence be? What should happen if multiple versions of Python are installed? Should the latest version take precedence? Should the latest version remove the path for the previous version?

Personally, I'm -1 on this idea unless it's a checkbox that can easily be deselected (or not selected by default). I install multiple different versions of Python to my system and I symlink \Python to the "active" version and I add "\Python\Scripts" to the path, so I can easily switch between my active version of Python. Adding \Python26\Scripts and \Python26-64\Scripts and \Python27\Scripts and ... to the path could become very messy.

Perhaps a better solution would be to provide a link in the start menu or a script to be run which adds the scripts to the path for that instance of Python... so it could be easily and painlessly added after the fact.
msg115456 - (view) Author: Sorin Sbarnea (ssbarnea) * Date: 2010-09-03 14:38
Important tools (like ease_install, pypm) from `Script` directory are already including version prefixes in their names (tool-2.7.exe).

This means that it should not be a big problem having several Scripts directories on your path.

Most python users are not installing several versions, but we could expect that most of them will want to run a tool from scripts.
msg115457 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-09-03 14:58
> Important tools (like ease_install, pypm) from `Script` directory are
> already including version prefixes in their names (tool-2.7.exe).
> 
> This means that it should not be a big problem having several Scripts
> directories on your path.

Just adding all Script directories to the path would penalize those projects who don't add versions to their file names. We should not do that.

If we're going to add any type of path manipulation, it should have the options to replace existing paths, append existing paths, or do nothing.


> Most python users are not installing several versions, but we could
> expect that most of them will want to run a tool from scripts.

Neither of these are true from my experience. Since 3.0 came out, I have always had a 2.x and 3.x installed concurrently, and come across many coworkers who have numerous versions installed. As for most people using something in Scripts, I've rarely interacted with anyone who uses it or knows about it besides myself.
msg115458 - (view) Author: Brian Curtin (brian.curtin) * (Python committer) Date: 2010-09-03 14:59
s/append existing paths/append new paths/
msg115480 - (view) Author: Sridhar Ratnakumar (srid) Date: 2010-09-03 18:22
FWIW, since last year ActivePython 2.6/2.7 puts C:\PythonXY\Scripts and %APPDATA%\Python\Scripts in %PATH% and we haven't had any complaints so far.

In addition, we also create a versioned interpreter executable - C:\PythonXY\pythonxy.exe - that is something the official installer can do as well, as it makes it possible to just type, say, "python27" when multiple Python versions are installed ... similar to typing 'python2.7' on *nix.
msg139885 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2011-07-05 15:55
Duplicate of #3561 (or maybe the reverse)
msg168344 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2012-08-15 22:54
BTW, any reason to create python27.exe instead of python2.7.exe (so that the unix-centered docs about command lines would also apply to your Pythons)?
History
Date User Action Args
2022-04-11 14:56:54adminsetgithub: 51480
2014-02-20 14:38:58piotr.dobrogostsetnosy: + piotr.dobrogost
2012-08-15 22:54:14eric.araujosetmessages: + msg168344
2012-08-14 03:45:13r.david.murraysetstatus: open -> closed
superseder: Windows installer should add Python and Scripts directories to the PATH environment variable
resolution: duplicate
stage: needs patch -> resolved
2011-07-05 15:55:50eric.araujosetmessages: + msg139885
2011-07-05 15:55:36eric.araujosetmessages: - msg139884
2011-07-05 15:55:29eric.araujosetnosy: + eric.araujo
messages: + msg139884
2010-09-03 18:22:39sridsetmessages: + msg115480
2010-09-03 14:59:48brian.curtinsetmessages: + msg115458
2010-09-03 14:58:36brian.curtinsetversions: - Python 3.3
nosy: + brian.curtin

messages: + msg115457

stage: needs patch
2010-09-03 14:38:19ssbarneasetmessages: + msg115456
2010-09-03 14:07:58jaracosetnosy: + jaraco
messages: + msg115454
2010-07-19 18:06:30sridsetnosy: + srid

type: behavior -> enhancement
components: + Windows
versions: + Python 3.3, - Python 2.6, Python 2.5, Python 2.4, Python 3.0, Python 3.1
2010-07-14 10:54:55ssbarneasetmessages: + msg110264
2009-11-18 08:40:52ssbarneasetmessages: + msg95414
2009-11-18 02:07:20Dude-Xsetnosy: + Dude-X
messages: + msg95409
2009-10-28 16:59:11ssbarneacreate