New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PYTHON3PATH environment variable to supersede PYTHONPATH for multi-Python environments #46628
Comments
Currently if you have both Python 3 and Python 2 installed, there's no It would be good to have a PYTHON3PATH which, if present, would be |
-1 Sites that need this functionality can emulate this feature in site.py sys.path[1:1] = os.getenv("PYTHON3PATH", "").split(os.pathsep) in py3k installation. I could not find any discussion beyond the original post at http://mail.python.org/pipermail/python-3000/2008-February/012008.html |
I don't understand your objection. It sounds like you're objecting, but As I understand it, "sites" don't need this feature, developers do. Normally what I'd do to manipulate sys.path dynamically between Will this specific case be supported so that developers don't need to |
This sounds like a kludge addressing a transient
There are many ways to address multi-python site issues. PYTHONPATH is I would suggest to wait until there are enough reports from the field on [I have to mention that perl 5 uses PERL5PATH, but I am not sure whether |
The idea is that PYTHON3PATH will be honored in preference to However, I think it's misleading to call the Python 3 transition a The biggest way to shorten this problem is to provide tools and idioms As far as "version specific file extensions" - I'd be very happy with |
I once even had the need for a PYTHON24PATH or PYTHON25PATH. |
c modules cannot be used when the minor version number changes. If I |
I even run modules compiled for Python 2.2 successfully on 2.5... |
I have never had a problem of different python versions coexisting on See also bpo-1536339, bpo-1553166, and bpo-858809. Ideally, I would like to see a mechanism that would allow both standard |
What's the status of this? |
Setting up specific environments for each Python version is outside the scope of Python. This is something the user needs to handle using a virtualenv setup, an env-setup shell script or similar approach. |
I disagree with the closing of this bug on the following grounds: currently, and for the foreseeable future, there will be two python commands on many systems, 'python' and 'python3'. This is unlike the superficially similar situation with different versions of the 2 line. I think this issue should be discussed on python-dev before being closed, and will post a pointer there. |
R. David Murray wrote:
You can easily have python3 implemented as shell script setting up Python itself does not install as python3, so this is not a configuration Also note that it's easy to write a sitecustomize.py which takes |
Yes, it does: rdmurray@maestro:~/python/py3k>ls -l ../ptest/p3/bin total 7328 That's a straight 'make install' from my svn checkout of the py3k trunk. |
yes, and you need to write a python shell script, which resets that |
R. David Murray wrote:
Sorry, forgot about that change. The name of the binaries is changed I wonder whether anyone has ever tried building Python on AIX. I'm still -1 on the change. People setting up PYTHONPATH will know what they are doing and also Besides, if you change PYTHONPATH, you'd also have to change |
Guido pronounced on this on python-dev, so closing the request again. |
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:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: