[Python-Dev] Python install layout and the PATH on win32

Lindberg, Van Van.Lindberg at haynesboone.com
Tue Mar 20 22:54:16 CET 2012


On 3/20/2012 3:31 PM, Paul Moore wrote:
> Serious question: Given a brand new PC, if you were installing Python
> 2.7, 3.2, 3.3a1, jython, and pypy, what would you do (beyond simply
> running 5 installers) to get your environment set up the way you want?

I install each python in its own directory:

C:/lib/python/2.7
C:/lib/python/3.2
C:/lib/python/3.3
C:/lib/jython
C:/lib/pypy

Jython and Pypy get their own directories because they can have 
different version compatibilities.

I then edit my distutils.command.install and patch pip/virtualenv so 
that all my directories are 'bin'/'lib'/'include'.

I have never used the py.exe runner, but I then choose whichever Python 
is my default (right now 2.7, but hoping that I will be able to switch 
during the 3.3 timeframe) and that gets put on the PATH, along with its 
'bin' directory. The other root dirs/bin directories get put on the PATH 
after the default Python.

I don't remember whether I did it or whether it is installed that way, 
but I have a python2.6.exe and an pythonw.2.6.exe, etc, and all the 
individual installers include both a pip and a pip-2.6 version (or 
whatever that install has). I honestly don't remember - I would love to 
have someone else check.

With this setup, I get my default choice anytime I type "python" and a 
specific interpreter version when I specify it. Same with installers, etc.

I then install virtualenv and virtualenvwrapper-powershell and do all of 
my development out of virtualenvs. Occasionally I will install something 
to the system python if it is a pain to compile and I am installing a 
binary version from somewhere, but I generally try to keep the system 
python(s) clean.CIRCULAR 230 NOTICE: To ensure compliance with requirements imposed by 
U.S. Treasury Regulations, Haynes and Boone, LLP informs you that any 
U.S. tax advice contained in this communication (including any 
attachments) was not intended or written to be used, and cannot be 
used, for the purpose of (i) avoiding penalties under the Internal 
Revenue Code or (ii) promoting, marketing or recommending to another 
party any transaction or matter addressed herein.

CONFIDENTIALITY NOTICE: This electronic mail transmission is confidential, 
may be privileged and should be read or retained only by the intended 
recipient. If you have received this transmission in error, please 
immediately notify the sender and delete it from your system.



More information about the Python-Dev mailing list