Issue 7231: Windows installer does not add \Scripts folder to the path (original) (raw)

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:54 admin set github: 51480
2014-02-20 14:38:58 piotr.dobrogost set nosy: + piotr.dobrogost
2012-08-15 22:54:14 eric.araujo set messages: +
2012-08-14 03:45:13 r.david.murray set status: open -> closedsuperseder: Windows installer should add Python and Scripts directories to the PATH environment variableresolution: duplicatestage: needs patch -> resolved
2011-07-05 15:55:50 eric.araujo set messages: +
2011-07-05 15:55:36 eric.araujo set messages: -
2011-07-05 15:55:29 eric.araujo set nosy: + eric.araujomessages: +
2010-09-03 18:22:39 srid set messages: +
2010-09-03 14:59:48 brian.curtin set messages: +
2010-09-03 14:58:36 brian.curtin set versions: - Python 3.3nosy: + brian.curtinmessages: + stage: needs patch
2010-09-03 14:38:19 ssbarnea set messages: +
2010-09-03 14:07:58 jaraco set nosy: + jaracomessages: +
2010-07-19 18:06:30 srid set nosy: + sridtype: behavior -> enhancementcomponents: + Windowsversions: + Python 3.3, - Python 2.6, Python 2.5, Python 2.4, Python 3.0, Python 3.1
2010-07-14 10:54:55 ssbarnea set messages: +
2009-11-18 08:40:52 ssbarnea set messages: +
2009-11-18 02:07:20 Dude-X set nosy: + Dude-Xmessages: +
2009-10-28 16:59:11 ssbarnea create