[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PYTHONPATH woes
From: |
Pjotr Prins |
Subject: |
Re: PYTHONPATH woes |
Date: |
Tue, 20 Feb 2018 16:01:35 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Tue, Feb 20, 2018 at 11:53:54AM +0100, Ricardo Wurmus wrote:
> Would it be good to make the wrappers for Python scripts stricter and
> not accept any user-set PYTHONPATH?
I think that is a bad idea. You need to be able to opt out. Also
people need to experiment with modules without understanding Guix per
se. In my upcomping blog I would emphasize packaging at the point you
become a serious user.
That should come with a health warning ;). Similarly we should allow
for LD_LIBRARY_PATH etc. It is what they exist for, even if it is
dangerous.
> How do we approach the problem of having both Python 2 modules and
> Python 3 modules in the same profile? PYTHONPATH will be set to refer
> to the site-packages directories of both versions, which is never good.
> Does Python offer us a way to do better? Can we make use of pth files
> to get around this problem somehow?
Python should have created PYTHONPATH2 to split them out. We could
patch python2 to do just that.
Even so, the real solution is separate profiles. I get that with
versions of Ruby too.
Pj.