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.

Author bryangeneolson
Recipients bryangeneolson
Date 2013-01-21.23:57:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Python 3.3 includes PEP 397, a Python launcher for Windows, and PEP 405, virtual environment support in core. Unfortunately the Windows launcher does not respect virtual environments. Even with with a virtual environment activated and the current directory at the virtual environment's root, the Windows launcher will start python with the system environment, not the active virtual environment.

To demo:

Install python 3.3 for windows.

Create a virtual environment:

  C:\>c:\Python33\Tools\Scripts\ c:\virtpy

Activate the virtual environment:

  (virtpy) C:\>

Optionally cd to the virtual environment:

  (virtpy) C:\>cd virtpy
  (virtpy) C:\virtpy>

Start Python 3 with the new windows launcher:

  (virtpy) C:\virtpy>py -3
  Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
  Type "help", "copyright", "credits" or "license" for more information.

Check sys.path

  >>> import sys
  >>> sys.path
  ['', 'C:\\Windows\\system32\\', 'C:\\bin\\Python33\\DLLs', 'C:\\bin\\Python33\\lib', 'C:\\bin\\Python33', 'C:\\bin\\Python33\\lib\\site-packages']

The worst effect I've found is that installation of a package with windows launcher, "py -3 install", will ignore the active virtual environment and will change the system Python environment. That's bad because users frequently employ virtual environments to isolate changes that could damage a system configuration.
Date User Action Args
2013-01-21 23:57:37bryangeneolsonsetrecipients: + bryangeneolson
2013-01-21 23:57:37bryangeneolsonsetmessageid: <>
2013-01-21 23:57:37bryangeneolsonlinkissue17010 messages
2013-01-21 23:57:36bryangeneolsoncreate