LUMC / kPAL

Analysis toolkit and programming library for k-mer profiles
http://kpal.readthedocs.org/
Other
30 stars 6 forks source link

pip install fails on clean virtualenv - h5py related? #1

Open tseemann opened 9 years ago

tseemann commented 9 years ago
% virtualenv /bio/sw/kPAL
% /bio/sw/kPAL/bin/pip install kPAL
Command /bio/sw/kPAL/bin/python -c "import setuptools;**file**='/bio/sw/kPAL/build/h5py/setup.py';exec(compile(open(**file**).read().replace('\r\n', '\n'), **file**, 'exec'))" install --single-version-externally-managed --record /tmp/pip-53rtkL-record/install-record.txt --install-headers /bio/sw/kPAL/include/site/python2.7 failed with error code 1 in /bio/sw/kPAL/build/h5py Exception information: Traceback (most recent call last): File "/bio/sw/kPAL/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main status = self.run(options, args) File "/bio/sw/kPAL/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 250, in run requirement_set.install(install_options, global_options) File "/bio/sw/kPAL/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1133, in install requirement.install(install_options, global_options) File "/bio/sw/kPAL/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 577, in install cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False) File "/bio/sw/kPAL/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 256, in call_subprocess % (command_desc, proc.returncode, cwd)) InstallationError: Command /bio/sw/kPAL/bin/python -c "import setuptools;**file**='/bio/sw/kPAL/build/h5py/setup.py';exec(compile(open(**file**).read().replace('\r\n', '\n'), **file**, 'exec'))" install --single-version-externally-managed --record /tmp/pip-53rtkL-record/install-record.txt --install-headers /bio/sw/kPAL/include/site/python2.7 failed with error code 1 in /bio/sw/kPAL/build/h5py
tseemann commented 9 years ago

I discovered the problem was that I needed to install Cython as well (h5py doesn't have it as a dependency).

These steps will install it fully:

% virtualenv /bio/sw/kPAL
% /bio/sw/kPAL/bin/pip install cython
% /bio/sw/kPAL/bin/pip install kPAL
% /bio/sw/kPAL/bin/kpal
usage: kpal [-h] [-v]

Success!

martijnvermaat commented 9 years ago

Thanks for the heads up @tseemann!

It always surprises me how difficult it is to really fix Python packaging. Adding Cython as a dependency for kPAL explicitely won't fix this (reliably), since there's no way of specifying an order for dependencies.

I'll give it some more thought and will add a note to the documentation.

martijnvermaat commented 9 years ago

Actually, Cython is listed as a dependency in h5py's setup.py, but I have no idea why it isn't installed first (there also have been quite some changes there with h5py release 2.4.0).

I opened bug h5py/h5py#535

tseemann commented 9 years ago

Thanks for looking into it. I'm not sure I'll ever fully understand Python packaging either!