Skip to content

The -p N.M shortcut doesn't work for Python 3.5 on Windows #864

Closed
@pfmoore

Description

@pfmoore

The --python command line can take an abbreviated interpreter name. On Unix this is one of the versioned alias names (python2.7, python3, ...) and is looked up on PATH.

On Windows the versioned names don't exist so the registry is searched for the Python version specified. So, -p 2.7 finds the location of Python 2.7 in the registry and uses that.

However, the registry layout is not well documented, and is complex (user installs, 32-bit vs 64-bit). It also seems to have changed in Python 3.5, and -p 3.5 does not work. Rather than attempt to fix this, though, I propose that the feature be marked as deprecated, and left as it stands. It's not clear that it was ever widely used.

People wanting to use an abbreviated interpreter name would be better to run py -N.M -m virtualenv (assuming virtualenv is installed under Python N.M) or py -N.M C:\path\to\virtualenv to run a standalone copy of virtualenv. This uses the (fully supported) Python launcher to select the required Python version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions