Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behavior during installation of XRoot python bindings via pip #991

Closed
cheidecker opened this issue May 20, 2019 · 3 comments
Closed
Assignees

Comments

@cheidecker
Copy link

Dear XRootD users and developers,

I wanted to install the XRootD python bindings for python 3.5 via pip on
ScientificLinux 6, CentOS 7 and Ubuntu 18.04. For installation, I used
the syntax python3.5 -m pip install XRootD. Additionally, i tried to
install the XRootD python bindings for python 2.7.

Since I observed some unexpected behavior during the installation and
needed to find out and fix missing dependencies manually, I would
recommend to change the affected parts of the installation procedure.

  1. The pip output message

Even if the installation fails, pip states the installation as
successful ignoring any errors.

  1. The compilation of XRootD during pip installation

The installation procedure does not check if all prerequisites are
available.
It would be nice, if pip tells you to install the required packages
and you don't have to look into the debug output.

For CentOS7, the following packages need to be installed:

  • cmake
  • make
  • zlib-devel
  • gcc-c++
  • openssl-devel
  • python-devel

There may be additional requirements that were already installed on
my system.

  1. The python dependency in the installation script

If I understood correctly, pip uses the install.sh script for
installing the XRootD python bindings.

In line 32, python setup.py install calls the default python
version regardless of what python version was called for pip.
If I sourced python3.5, the installation continues with the default
python2.7 at this point.
I have temporarily fixed this by linking the default python to the
correct version to continue testing.

Additionally, I found that cmake in line 8 uses the default
python interpreter and library of the system instead of the version
called by pip.

-- Found PythonInterp: /usr/bin/python2 (found suitable version
"2.7.5", minimum required is "2.4")
-- Found PythonLibs: /usr/lib64/libpython2.7.so (found suitable
version "2.7.5", minimum required is "2.4")

This doesn't cause a failure of the installation, but I'm not sure
if it will cause issues later.

I finally managed to install the XRootD python bindings for both python
versions on all mentioned operating systems, but it was a long journey.

I would recommend to address these issues to make the XRootD python
bindings easily installable by everyone. At least, a small documentation
would be very helpful.

Best regards and many thanks,

Christoph

@simonmichal simonmichal self-assigned this May 20, 2019
@simonmichal
Copy link
Contributor

@cheidecker : thank you for bringing this up!

  • regarding 1) I fixed this yesterday: 1a60ea1
  • regarding 2) I just pushed a patch: 82a9114
  • and finally, regarding 3) this has been fixed already some time ago in b1c3f22

you can expect all those to be included in 4.10.0 release.

@adriansev
Copy link
Contributor

@simonmichal just a small comment : the pip compilation of xrootd use the new cmake flag for client only compilation?

@cheidecker
Copy link
Author

Thank you so much! Installing pyxrootd from XRootD 4.10.0 Release Candidate 4 worked well for me. I'm also looking forward to trying out the new Pip version when it becomes available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants