Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows installer does not add \Scripts folder to the path #51480

Closed
ssbarnea mannequin opened this issue Oct 28, 2009 · 11 comments
Closed

Windows installer does not add \Scripts folder to the path #51480

ssbarnea mannequin opened this issue Oct 28, 2009 · 11 comments
Labels
OS-windows topic-installation type-feature A feature request or enhancement

Comments

@ssbarnea
Copy link
Mannequin

ssbarnea mannequin commented Oct 28, 2009

BPO 7231
Nosy @jaraco, @merwok, @ssbarnea, @briancurtin
Superseder
  • bpo-3561: Windows installer should add Python and Scripts directories to the PATH environment variable
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2012-08-14.03:45:13.822>
    created_at = <Date 2009-10-28.16:59:11.117>
    labels = ['type-feature', 'expert-installation', 'OS-windows']
    title = 'Windows installer does not add \\Scripts folder to the path'
    updated_at = <Date 2014-02-20.14:38:58.353>
    user = 'https://github.com/ssbarnea'

    bugs.python.org fields:

    activity = <Date 2014-02-20.14:38:58.353>
    actor = 'piotr.dobrogost'
    assignee = 'none'
    closed = True
    closed_date = <Date 2012-08-14.03:45:13.822>
    closer = 'r.david.murray'
    components = ['Installation', 'Windows']
    creation = <Date 2009-10-28.16:59:11.117>
    creator = 'ssbarnea'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 7231
    keywords = []
    message_count = 11.0
    messages = ['94633', '95409', '95414', '110264', '115454', '115456', '115457', '115458', '115480', '139885', '168344']
    nosy_count = 7.0
    nosy_names = ['jaraco', 'Dude-X', 'eric.araujo', 'ssbarnea', 'brian.curtin', 'srid', 'piotr.dobrogost']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '3561'
    type = 'enhancement'
    url = 'https://bugs.python.org/issue7231'
    versions = ['Python 2.7', 'Python 3.2']

    @ssbarnea
    Copy link
    Mannequin Author

    ssbarnea mannequin commented Oct 28, 2009

    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.

    @ssbarnea ssbarnea mannequin added type-bug An unexpected behavior, bug, or error topic-installation labels Oct 28, 2009
    @Dude-X
    Copy link
    Mannequin

    Dude-X mannequin commented Nov 18, 2009

    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.

    @ssbarnea
    Copy link
    Mannequin Author

    ssbarnea mannequin commented Nov 18, 2009

    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.

    @ssbarnea
    Copy link
    Mannequin Author

    ssbarnea mannequin commented Jul 14, 2010

    Additional information that will enable the installer to update the path without requiring a relogin/restart: http://support.microsoft.com/kb/104011

    @srid srid mannequin added OS-windows type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels Jul 19, 2010
    @jaraco
    Copy link
    Member

    jaraco commented Sep 3, 2010

    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.

    @ssbarnea
    Copy link
    Mannequin Author

    ssbarnea mannequin commented Sep 3, 2010

    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.

    @briancurtin
    Copy link
    Member

    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.

    @briancurtin
    Copy link
    Member

    s/append existing paths/append new paths/

    @srid
    Copy link
    Mannequin

    srid mannequin commented Sep 3, 2010

    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.

    @merwok
    Copy link
    Member

    merwok commented Jul 5, 2011

    Duplicate of bpo-3561 (or maybe the reverse)

    @merwok
    Copy link
    Member

    merwok commented Aug 15, 2012

    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)?

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    OS-windows topic-installation type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants