evansde77 / cirrus

python library build, test and devop like things assistant
Apache License 2.0
14 stars 7 forks source link

with conda, some packages don't install (even using extra-requirements) #166

Open jordansamuels opened 6 years ago

jordansamuels commented 6 years ago

E.g. holoviews will not install properly. If requirements.txt or test-requirements.txt has holoviews in it, this error occurs:

2017-07-17;INFO;local(/Users/jsamuels/cirrus-stuff/venv/bin/pip install -r requirements.txt)
Requirement already satisfied: requests in ./venv/lib/python3.6/site-packages (from -r requirements.txt (line 1))
Collecting holoviews (from -r requirements.txt (line 2))
  Using cached holoviews-1.8.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/ss/_jdjdck95_b6zg275525fytwsw2824/T/pip-build-icxlhaew/holoviews/setup.py", line 131, in <module>
        package_assets(example_path)
      File "/private/var/folders/ss/_jdjdck95_b6zg275525fytwsw2824/T/pip-build-icxlhaew/holoviews/setup.py", line 117, in package_assets
        import holoviews
      File "/private/var/folders/ss/_jdjdck95_b6zg275525fytwsw2824/T/pip-build-icxlhaew/holoviews/holoviews/__init__.py", line 5, in <module>
        import numpy as np # noqa (API import)
    ModuleNotFoundError: No module named 'numpy'

The workaround is to leave omit adding holoviews to requirements.txt and manually install as directed by the holoviews website, which uses conda instead of pip, e.g. conda install -c ioam holoviews. I've tried it without the -c ioam and it seems to work fine as well, it just gets an earlier version.

This is a generic problem - there are many libraries which either cannot be installed via pip, or shouldn't be (if they have performance enhancements only available in conda).

evansde77 commented 6 years ago

Will address this under the auspices of #164

jordansamuels commented 6 years ago

Two notes:

  1. It seems like conda allows us to specify what to install via pip - see e.g. here.
  2. The specific holoviews issue is here.
evansde77 commented 6 years ago

@jordansamuels can you take a look at the conda stuff in https://github.com/evansde77/cirrus/pull/167 and see if that looks like it will address this? I can help you set up a container if you want to poke at it?