Skip to content

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

Closed

Description

@ssbarnea
mannequin
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']

    Activity

    1. ssbarnea commented on Oct 28, 2009

      ssbarneamannequin
      MannequinAuthor

      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.

    2. Dude-X commented on Nov 18, 2009

      Dude-Xmannequin
      Mannequin

      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.

    3. ssbarnea commented on Nov 18, 2009

      ssbarneamannequin
      MannequinAuthor

      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.

    4. ssbarnea commented on Jul 14, 2010

      ssbarneamannequin
      MannequinAuthor

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

    5. added
      type-featureA feature request or enhancement
      and removed
      type-bugAn unexpected behavior, bug, or error
      on Jul 19, 2010
    6. jaraco commented on Sep 3, 2010

      @jaraco
      Member

      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.

    7. ssbarnea commented on Sep 3, 2010

      ssbarneamannequin
      MannequinAuthor

      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.

    8. briancurtin commented on Sep 3, 2010

      @briancurtin
      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.

    9. briancurtin commented on Sep 3, 2010

      @briancurtin
      Member

      s/append existing paths/append new paths/

    10. srid commented on Sep 3, 2010

      sridmannequin
      Mannequin

      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.

    11. merwok commented on Jul 5, 2011

      @merwok
      Member

      Duplicate of bpo-3561 (or maybe the reverse)

    12. merwok commented on Aug 15, 2012

      @merwok
      Member

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

    13. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions