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

Holoviews does not install reliably with pip #1734

Closed
jordansamuels opened this issue Jul 17, 2017 · 5 comments
Closed

Holoviews does not install reliably with pip #1734

jordansamuels opened this issue Jul 17, 2017 · 5 comments

Comments

@jordansamuels
Copy link
Contributor

It appears that holoviews does not properly install with pip in a clean environment, and that
the last release that installed properly is 1.7.0 . See further down on clean reproduction.

I've tested this on Centos 7 / Python 3.6.0. Installing 1.8.0 or 1.8.1 with or without [all]
results in an error message about params which is similar to the one supplied in a comment to
#1659 . Sometimes the error is about numpy instead of params.

These commands fail:

  • pip install holoviews
  • pip install holoviews[all]
  • pip install holoviews==1.8.0
  • pip install holoviews[all]==1.8.0

These commands succeed:

  • pip install holoviews==1.7.0
  • pip install holoviews[all]==1.7.0

Clean reproduction

Because issue is difficult to test and reproduce reliably, I have reproduced it using
Docker. I get the same behavior whether I'm using conda or pyenv.
Steps to reproduce cleanly:

  1. Install Docker
  2. Use this Dockerfile for conda, or this Dockerfile for pyenv. Put them in a conda or pyenv directory and cd to it.
  3. docker build -t repro .
  4. docker run -t repro pip install holoviews or another similar command from above.
@jordansamuels
Copy link
Contributor Author

jordansamuels commented Jul 17, 2017

Sample failure:

% docker run -ti repro  pip install 'holoviews[all]'
Collecting holoviews[all]
  Downloading holoviews-1.8.1.tar.gz (3.1MB)
    100% |################################| 3.1MB 64kB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-f6dq5rx3/holoviews/setup.py", line 131, in <module>
        package_assets(example_path)
      File "/tmp/pip-build-f6dq5rx3/holoviews/setup.py", line 117, in package_assets
        import holoviews
      File "/tmp/pip-build-f6dq5rx3/holoviews/holoviews/__init__.py", line 5, in <module>
        import numpy as np # noqa (API import)
    ModuleNotFoundError: No module named 'numpy'

@jordansamuels
Copy link
Contributor Author

If we manually do pip install numpy param first, then pip install holoviews will work. However, this approach isn't available with automated environment management, e.g. if we have requirements.txt as

numpy
param
holoviews

Then pip install -r requirements.txt still fails in the same way as noted in the main issue.

@tdsmith
Copy link

tdsmith commented Jul 18, 2017

The proximal cause is that setup.py imports holoviews, which tries to import holoview's dependencies before setuptools has had a chance to inspect or install the dependencies. https://github.com/ioam/holoviews/blob/master/setup.py#L117

@jlstevens
Copy link
Contributor

I think that is correct. Thanks for diagnosing this!

Recently setup.py was refactored which is why we are now encountering these problems with pip. One solution might be to simply copy the code from holoviews.util.examples into setup.py although that will mean an annoying duplication of code.

@jlstevens
Copy link
Contributor

This should be fixed in the PR reference above (#1782). Closing.

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