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

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

Open
tseemann opened this issue Dec 23, 2014 · 4 comments
Open

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

tseemann opened this issue Dec 23, 2014 · 4 comments

Comments

@tseemann
Copy link

% 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
Copy link
Author

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
Copy link
Collaborator

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
Copy link
Collaborator

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
Copy link
Author

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

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

2 participants