Hi,

in the end I (as I work with Maxime) found a solution that seems to work
but needs some more testing:
* instead of setting PYTHONPATH, eb-generated modules set EBPYTHONPATH
* then in the default site-packages directory (or in a location pointed to
by a single-entry PYTHONPATH) we have a file named "sitecustomize.py" that
does this:

import os
import site
if "EBPYTHONPATH" in os.environ:
    for sitedir in os.environ["EBPYTHONPATH"].split(':'):
        site.addsitedir(sitedir)

(see https://docs.python.org/2/library/site.html)

* now virtualenv-installed python packages take priority over
EBPYTHONPATH-pointed packages.

Regards,
Bart

On 14 August 2017 at 11:28, Maxime Boissonneault <
[email protected]> wrote:

> Hi Jack,
> Thanks, but I am not really looking to fix the module, I'm looking to fix
> the install so that it does not require setting PYTHONPATH at all.
>
> virtualenv do not require setting PYTHONPATH, which shields you against a
> bunch of conflicts. Setting global paths lead to conflict hell...
>
>
> Maxime
>
>
> On 17-08-14 11:18, Jack Perdue wrote:
>
>> Howdy Maxime,
>>
>> Not sure if it is relevant/useful (YMMV) but attached are
>> something we've been trying here.
>>
>> We call them myPython.  Note that Python 2 vs 3 have slightly
>> different VE command syntax.
>>
>> We also have some called myAnaconda for those preferrring
>> to use it.  The only cavaet there is that you need to update to
>> a fairly recent of conda (which I do in the EasyConfig) post install
>> in order the the package-cache to recognize the environment
>> variable so the user can download packages.
>>
>> Anyway, look them over and the web site they cite.
>>
>> Like I said, not sure it is helpful here though.
>>
>>
>> Jack Perdue
>> Lead Systems Administrator
>> High Performance Research Computing
>> TAMU Division of Research
>> [email protected]    http://hprc.tamu.edu
>> HPRC Helpdesk: [email protected]
>>
>> On 08/14/2017 09:58 AM, Maxime Boissonneault wrote:
>>
>>> Hi,
>>>
>>> Currently, EasyBuild bundles python modules to a --prefix, and then sets
>>> PYTHONPATH. This causes us trouble because it conflicts with usage of
>>> virtualenv for Python. Is there a way to tell EasyBuild Bundle to install
>>> in a virtual environment and not set PYTHONPATH instead ? I hear virtualenv
>>> can nicely inherit from each other, giving users the ability to install
>>> their own upgraded version of some python packages without us needing to
>>> create a new module each time and try to handle Python dependencies through
>>> modules.
>>>
>>>
>>>
>>
>


-- 
Dr. Bart E. Oldeman | [email protected] | [email protected]
Scientific Computing Analyst / Analyste en calcul scientifique
McGill HPC Centre / Centre de Calcul Haute Performance de McGill |
http://www.hpc.mcgill.ca
Calcul Québec | http://www.calculquebec.ca
Compute/Calcul Canada | http://www.computecanada.ca
Tel/Tél: 514-396-8926 | Fax/Télécopieur: 514-396-8934

Reply via email to