pip install package

often results in compiling (using gcc, g++, whatever) to produce a
binary. Usually that proceeds without issue.  However, there seems to
be no checking that the libraries required to link that binary are
already on the system.  Or at least the message which results when
they are not is not at all clear about what is missing.

I discovered that today by wasting several hours figuring out why
scanpy-scripts was failing trying to build dependency "louvain", which
would not install into a venv with pip.  It had something to do with
"igraph", but pip had downloaded python-igraph before it got to
louvain.  When louvain tried to build there was a mysterious message
about pkgconfig and igraph

Cannot find the C core of igraph on this system using pkg-config.

(Note that when python-igraph installs it places an igraph directory
in site-packages, so which it is referring to is fairly ambiguous.)
Then it tried to install a different version number of igraph, failed,
and the install failed.  This was very confusing because the second
igraph install was not (it turned out) a different version of
python-igraph but a system level igraph library, which it could not
install either because the process was not privileged and could not
write to the target directories.  Yet it tried to install anyway.
This is discussed in the louvain documentation here (it turns out):

https://github.com/vtraag/louvain-igraph

but since I was actually trying to install a different package, of
course I had not read the louvain documentation.

In short form the problem was "cannot build a binary because required
library libigraph.so is not present in the operating system" but that
was less than obvious in the barrage of warnings and error messages.

Is it possible to tell pip or setup.py to fail immediately when a
required system library like this is not found, here presumably after
that "C core" message, rather than confusing the matter further  with
a failed partial build and install of the same component?

More generally, is there anything in the python installation methods
which could list system libraries as dependencies and give a more
informative error message when they are missing?

Thanks,

David Mathog
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/archives/list/distutils-sig@python.org/message/MSS42UYQ7FJWHID54FXSW5M5KCMK7ZQI/

Reply via email to