From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pjotr Prins Subject: Re: PYTHONPATH woes Date: Fri, 23 Feb 2018 17:59:53 +0100 Message-ID: <20180223165953.GA6088@thebird.nl> References: <87371tqbyb.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52444) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1epGlH-0005V2-Gy for guix-devel@gnu.org; Fri, 23 Feb 2018 12:03:59 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1epGlE-0000lG-Dx for guix-devel@gnu.org; Fri, 23 Feb 2018 12:03:55 -0500 Received: from mail.thebird.nl ([95.154.246.10]:39586) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1epGlE-0000WT-7I for guix-devel@gnu.org; Fri, 23 Feb 2018 12:03:52 -0500 Content-Disposition: inline In-Reply-To: List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel@gnu.org On Fri, Feb 23, 2018 at 01:36:17PM +0100, Hartmut Goebel wrote: > The basic idea is make the application/script use a python within a > virtual environment. I nee to rethink some details and check whether > this will work out. I may misunderstand how you are doing this, but I think it is going to cause problems. Python makes assumptions about the environment and virtualenv kinda redirects those. On top of that we have guix profiles and people who need to redirect PYTHONPATH (temporarily). Adding virtualenv into the mix will complicate things. Then there are people using virtualenv on top of Guix ... I think the problem of mixing module versions has to be resolved through profiles. That should just work(tm). The problem of mixing interpreter versions can be resolved through profiles. Though there is the danger that people mix them into one profile. For this I suggest we tell Python2 to only use PYTHONPATH2. That way there is no interference. Python2 is being phased out (it is obsolete) and upstream should consider such a solution too. With Ruby we have a similar interpreter issue - even more fine grained between versions. It is a pain. But there is no real solution other than using profiles properly. Pj.