Hello Simon, I did install it today with exactly the same command line as you quoted. I do have locally installed python packages, but I assume those will not affect the DIRAC Python. At least they should not, if I am to treat it like a virtual environment. Anyway it seems like it is trying to use the right pip: $ which pip /opt/ppd/scratch/kdf77245/t2k_software/t2kGrid/t2kdm/DIRAC/Linux_x86_64_glibc-2.12/bin/pip And the PYTHONPATH looks reasonable as well: $ env | grep PYTHON PYTHONUNBUFFERED=yes PYTHONOPTIMIZE=x PYTHONPATH=/opt/ppd/scratch/kdf77245/t2k_software/t2kGrid/t2kdm/DIRAC: This is on a machine running SL6, by the way. Maybe that has something to do with it. Cheers Lukas Am 09/11/2018 um 16:12 schrieb Simon Fayer:
Hi Lukas,
Did you install DIRAC recently? Do you have any other python stuff installed in your user directory that may be interfering (--user installed pip or PYTHONPATH in ~/.bashrc)?
I tried it from a clean install (on CentOS6) and it seems to work for me...
$ mkdir testdir; cd testdir $ wget -np -O dirac-install https://raw.githubusercontent.com/DIRACGrid/DIRAC/integration/Core/scripts/d... $ chmod u+x dirac-install $ ./dirac-install -r v6r20p15 -i 27 -g v14r1 $ source bashrc $ unset REQUESTS_CA_BUNDLE SSL_CERT_DIR $ pip help
Usage: pip <command> [options]
...
Regards, Simon
On Fri, Nov 09, 2018 at 03:46:19PM +0000, Lukas Koch wrote:
Hello Simon,
I tried to do as you said, but pip does not seem to work after sourcing DIRAC's bashrc:
$ pip Traceback (most recent call last): File "/opt/ppd/scratch/kdf77245/t2k_software/t2kGrid/t2kdm/DIRAC/Linux_x86_64_glibc-2.12/bin/pip", line 7, in <module> from pip import main ImportError: cannot import name main
Cheers Lukas
Am 09/11/2018 um 15:16 schrieb Simon Fayer:
Hi Lukas,
The easiest way of doing this is to treat the DIRAC python environment as if it's a virtualenv and install whatever you need in to that (rather than the other way around).
# Install DIRAC UI & then start with a clean env... # Get a subshell bash source bashrc unset REQUESTS_CA_BUNDLE SSL_CERT_DIR # These upset pip pip install -e t2kdm # or whatever exit source bashrc # You should now have a python environment with your modules & DIRAC
Regards, Simon
On Fri, Nov 09, 2018 at 01:16:30PM +0000, Lukas Koch wrote:
Hello,
I am trying to implement a Dirac backend for the software we use at T2K to access the grid data. This software is written in Python and now I am facing the problem that Dirac comes with its own Python distribution that does *not* play nicely with either the system Python or virtual environments.
So my question is this: Is there a(n easy) way to make Dirac compatible with other Python software? Maybe a way to install the Dirac client in a regular virtual Python environment?
Cheers Lukas
-- Lukas KOCH Particle Physics Department STFC Rutherford Appleton Laboratory Mail: lukas.koch@stfc.ac.uk Tel: +44 (0) 1235 44 x6265