-
Notifications
You must be signed in to change notification settings - Fork 22
pip install fails with missing numpy #60
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
Comments
Is it that pip is unable to install numpy when it encounters the dependency? |
It does not appear to make any attempt at installing a dependency: $ pip install nexpy File "", line 17, in File "/tmp/pip-build-8hOZDz/nexpy/setup.py", line 14, in
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 745, in require
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 639, in resolve
pkg_resources.DistributionNotFound: numpy Cleaning up... |
How can this be a failure of NexPy?
|
Writing a bulletproof setup.py is always messy and virtually impossible. Has anyone packaged nexpy for conda? That might be the easiest way to get running quickly on virtual machines. If there is interest I can take a look at this. |
I would be delighted if you were able to get a conda package set up. The popularity of conda was one of the most important reasons for making NeXpy compatible with PyQt, so it's on my to-do list. Not sure why pip wouldn't just install numpy though, since it is clearly listed as a dependency. |
My understanding is that installation-time dependencies (as opposed to runtime dependencies) cannot be automatically installed by pip/setuptools. This is -- if I understand correctly -- a limitation of setuptools. The best you can do is fail informatively, which nexpy is doing. |
There are ways to setup tools to cleanly install other things first, matplotlib does this, but it requires cajoling. See https://pythonhosted.org/setuptools/setuptools.html#new-and-changed-setup-keywords and |
That should fix the build dependency problem #60
Just adding a setup_requires didn't do the trick. I made the change on a branch and tried: pip install git+git://github.com/nexpy/nexpy.git@zjttoefs-issue-60 It still fails on the same line. I must admit I have a very bare understanding of setuptools but I don't quite get why the setup needs (imports) numpy (and nexpy). |
@zjttoefs Your not alone 😉 |
Thanks @tacaswell ! |
I'm all in favor of raiding matplotlib whenever possible. I won't have time to look into this for a week or so, but will be happy to consider pull requests. By the way, I had to remove PySide from the dependency list in order to allow PyQt4 or 5-only installations. I don't know if there is any way of handling these kinds of dependencies better. |
As a warning, mpl's setup.py grew organically through multiple generations h5py might be a better template. On Fri, Jun 19, 2015 at 11:08 AM Ray Osborn [email protected]
|
There is a obvious workaround.
I'm playing with some fresh virtual machines and would prefer nexpy handling at least the mandatory dependencies.
The text was updated successfully, but these errors were encountered: