easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
104 stars 283 forks source link

installing Python packages on SLES doesn't work out of the box #373

Open boegel opened 10 years ago

boegel commented 10 years ago

@ocaisa, @pforai: Can you provide the details of this problem that was reported during today's EasyBuild conf call?

ocaisa commented 10 years ago

I remember now that I had to do this on Juropa, which is OpenSUSE. You need a special file in your home directory:

ocaisa@jj28l05:~> more .pydistutils.cfg [install] prefix=

Without this you can't install python modules in user space, it always tries to go back to the system default.

On 18 March 2014 15:44, Kenneth Hoste notifications@github.com<mailto:notifications@github.com> wrote:

@ocaisahttps://github.com/ocaisa, @pforaihttps://github.com/pforai: Can you provide the details of this problem that was reported during today's EasyBuild conf call?

Reply to this email directly or view it on GitHubhttps://github.com/hpcugent/easybuild-easyblocks/issues/373.

Dr. Alan O'Cais Application Support Juelich Supercomputing Centre Forschungszentrum Juelich GmbH 52425 Juelich, Germany

Phone: +49 2461 61 5213 Fax: +49 2461 61 6656 E-mail: a.ocais@fz-juelich.demailto:a.ocais@fz-juelich.de WWW: http://www.fz-juelich.de/jsc/



Forschungszentrum Juelich GmbH 52425 Juelich Sitz der Gesellschaft: Juelich Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498 Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher Geschaeftsfuehrung: Prof. Dr. Achim Bachem (Vorsitzender), Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


pforai commented 10 years ago

On SLES, the site package location is customised to /usr/local/lib64/python2.6/site-packages with the file /usr/lib64/python2.6/distutils/distutils.cfg. And this file has the following stanzas in there:

[build_py]
optimize=0

[install]
prefix=/usr/local
optimize=0

Now the issue is that the prefix specified in there is global (ie for every user) and easy_install and pip (distribute) generally will read this file and even if the appropriate options are used for installation (like pip install --user) that global setting has higher priority and is still in effect.

As such users on SLES systems will not be able to install EB with pip or easy_install. Also installation of python packages with EB (which is using --prefix for calls to setup.py) will fail as normal system users don't have permissions in /usr/local.

We have the following configuration in $HOME/.pydistutils.cfg

[install] 
prefix=

to solve this issue.

boegel commented 9 years ago

see also #475