Specifying a url to a .whl file in a conda env .yml file

Viewed 1706

I want a specific older version of a package (h2o) to be installed when I load a conda env .yml file. However, the older versions for this package only seem to work if I install them using pip directly from a the url hosting the .whl file. For example if I want to install version 3.18.0.8 I need to do this:

pip install http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/8/Python/h2o-3.18.0.8-py2.py3-none-any.whl

Is there a way for me to include that url (i.e. http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/8/index.html) in the .yml file so that if I create a virtual environment using the .yml file it downloads and installs the correct version of h2o?

1 Answers

You can specify a pip dependency in your environment.yml like so:

name: myenv
dependencies:
  - python
  - pip:
    - http://h2o-release.s3.amazonaws.com/h2o/rel-wolpert/8/Python/h2o-3.18.0.8-py2.py3-none-any.whl

See "Creating an environment file manually" for more details.

Related