[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nix-dev
Subject:    Re: [Nix-dev] Python package works with PYTHONHOME but not with PYTHONPATH
From:       Nikolay Amiantov <ab () fmap ! me>
Date:       2016-12-21 13:20:02
Message-ID: 2d84ab15-6fab-eec3-ad52-d6615b683994 () fmap ! me
[Download RAW message or body]

On 12/21/2016 12:55 AM, Nikolay Amiantov wrote:
> tl;dr: Why can a Python package behave differently when imported using
> PYTHONPATH and PYTHONHOME? Specifically, work with *HOME but not with *PATH.

I've untangled this yesterday, it seems the problem was that the package
in question relied on a .pth file installed by another package in the
same directory, so it didn't provide its own .pth file. When everything
was symlinked to one directory (buildEnv scenario) this assumption held,
so the package worked.

To my future self: Python not only searches packages in site-packages
directory, but also searches there for .pth files, which list additional
paths to be searched.

-- 
Nikolay.
_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic