google-deepmind / acme

A library of reinforcement learning components and agents
Apache License 2.0
3.5k stars 426 forks source link

Installation of dm-acme fails based on PyPI issue with dependency rlax #150

Closed siggiorn closed 2 years ago

siggiorn commented 3 years ago

Following the pip installation instructions from the README I get the following error:

ERROR: Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
dm-acme depends on rlax@ git+git://github.com/deepmind/rlax.git#egg=rlax

Related recent issue: https://github.com/deepmind/acme/issues/98

Here is the full output of my commands:

➜  Development python3 -m venv acme
➜  Development source acme/bin/activate
(acme) ➜  Development pip install --upgrade pip setuptools wheel
Collecting pip
  Using cached https://files.pythonhosted.org/packages/ca/31/b88ef447d595963c01060998cb329251648acf4a067721b0452c45527eb8/pip-21.2.4-py3-none-any.whl
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/c4/c1/aed7dfedb18ea73d7713bf6ca034ab001a6425be49ffa7e79bbd5999f677/setuptools-58.0.4-py3-none-any.whl (816kB)
     |████████████████████████████████| 819kB 4.4MB/s
Collecting wheel
  Using cached https://files.pythonhosted.org/packages/04/80/cad93b40262f5d09f6de82adbee452fd43cdff60830b56a74c5930f7e277/wheel-0.37.0-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
  Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
      Successfully uninstalled setuptools-41.2.0
Successfully installed pip-21.2.4 setuptools-58.0.4 wheel-0.37.0
(acme) ➜  Development pip install 'dm-acme' 'dm-acme[jax]' 'dm-acme[tensorflow]'
Collecting dm-acme
  Using cached dm_acme-0.2.2-py3-none-any.whl
Collecting dm-tree
  Using cached dm_tree-0.1.6-cp38-cp38-macosx_10_14_x86_64.whl (95 kB)
Collecting numpy
  Using cached numpy-1.21.2-cp38-cp38-macosx_10_9_x86_64.whl (16.9 MB)
Collecting pillow
  Using cached Pillow-8.3.2-cp38-cp38-macosx_10_10_x86_64.whl (3.0 MB)
Collecting dm-env
  Using cached dm_env-1.5-py3-none-any.whl (26 kB)
Collecting absl-py
  Using cached absl_py-0.13.0-py3-none-any.whl (132 kB)
Collecting dm-acme[jax]
  Using cached dm-acme-0.2.1.tar.gz (219 kB)
ERROR: Packages installed from PyPI cannot depend on packages which are not also hosted on PyPI.
dm-acme depends on rlax@ git+git://github.com/deepmind/rlax.git#egg=rlax
ethanluoyc commented 3 years ago

It seems that you are attempting to install dm-acme==0.2.1 but I think the latest release is 0.2.2. Maybe try to install without using the cache?

pip install --no-cache-dir 'dm-acme' 'dm-acme[jax]' 'dm-acme[tensorflow]'
siggiorn commented 3 years ago

Thanks for the suggestion, it led to some discoveries.

pip install --no-cache-dir 'dm-acme' does in fact work and installs the latest version of 0.2.2.

However pip install --no-cache-dir 'dm-acme[jax]' ends up downloading dm-acme-0.2.1.tar.gz which gets the error above about rlax.

If I request the latest version with pip install --no-cache-dir 'dm-acme[jax]==0.2.2' then I get a different error:

ERROR: Could not find a version that satisfies the requirement dm-reverb; extra == "jax" (from dm-acme[jax]) (from versions: none)
ERROR: No matching distribution found for dm-reverb; extra == "jax"

which led me to see from https://github.com/deepmind/reverb that reverb isn't supported on my platform, OSX, so that error is expected.