<br><br><div><span class="gmail_quote">On 3/9/07, <b class="gmail_sendername">Anthony Baxter</b> &lt;<a href="mailto:anthony@interlink.com.au">anthony@interlink.com.au</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
What do people think about the idea of a version-specific PYTHONPATH<br>environment variable? Something like PYTHON25PATH or the like.<br>Reason I ask is that on our production systems, we have a couple of<br>versions of Python being used by different systems. Yes, yes, in a
<br>perfect world they&#39;d be all updated at the same time, sure. There&#39;s<br>occasionally issues with the PYTHONPATH being pointed at something<br>like .../lib/python2.4/site-packages or the like, and then have<br>issues when 
python2.3 or some other different version is run. If we<br>allowed people to optionally specify a more specific version this<br>problem would go away.</blockquote><div><br>Few weeks ago I actually needed exactly this functionality. I worked around it with a .pth file installed for 
<br>each version of python I&#39;m using with the following contents:<br><br>import sys; sys.path.insert(0, os.path.expanduser(&quot;~/pylib%s.%s&quot; % sys.version_info[:2]))<br>import site, os, sys; site.addsitedir(os.path.expanduser
(&quot;~/pylib%s.%s&quot; % sys.version_info[:2]))<br><br></div><br></div>