sunblaze-ucb / rl-generalization

Modifiable OpenAI Gym environments for studying generalization in RL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gym 0.10.8r1

lmzintgraf opened this issue · comments

While trying to install the requirements, I first get this message

Requested gym==0.10.8r1 from git+https://github.com/openai/gym.git@094e6b8e6a102644667d53d9dac6f2245bf80c6f#egg=gym-0.10.8r1 (from sunblaze-envs==0.1.0), but installing version 0.10.8

and later I get the error that it failed to build the wheel for Box2D because

sunblaze-envs 0.1.0 has requirement gym==0.10.8r1, but you'll have gym 0.10.8 which is incompatible.

Could you help me out with this?

Everything* works fine when renaming '0.10.8r1' into '0.10.8' (line 39 and 43 in setup.py). Guess they just renamed the release.

*Tested on the CartPole example.

Hi @lmzintgraf, thanks for the update. Those warnings you're seeing are actually expected, since we're using dependency_links in setup.py to download a specific commit/version of the Gym and Baselines repos (094e6b8e6a102644667d53d9dac6f2245bf80c6f and 2b0283b9db18c768f8e9fa29fbedc5e48499acc6 respectively). 0.10.8r1 isn't actually a real version name, it's just tag used so that when pip sees gym==0.10.8r1, it downloads the package directly from the github link specified before ...#egg=gym-0.10.8r1, you can see more here.

Gym version 0.10.8 pulled from PyPI should work fine too, though it may not have the rendering fixes in the specific commit specified in setup.py (see the PR for more detail).

Hi @cpacker. Thanks for getting back to me in such detail!

I wasn't familiar with dependency_links so this is very helpful, thanks! I've now resolved my issue by just installing the newest versions of both baselines/gym straight from their respective git repos.

On my side the dependency_links were not working as expected, see this output:

Luisas-MacBook-Pro:rl-generalization luisa$ pip3 install --process-dependency-links -e .
Obtaining file:///Users/luisa/work/rl-generalization
DEPRECATION: Dependency Links processing has been deprecated and will be removed in a future release.
Collecting gym==0.10.8r1 (from sunblaze-envs==0.1.0)
  Cloning https://github.com/openai/gym.git (to revision 094e6b8e6a102644667d53d9dac6f2245bf80c6f) to /private/var/folders/73/8d1r0s6159z24n4_94gm6xxr0000gn/T/pip-install-0r536u7g/gym
  Requested gym==0.10.8r1 from git+https://github.com/openai/gym.git@094e6b8e6a102644667d53d9dac6f2245bf80c6f#egg=gym-0.10.8r1 (from sunblaze-envs==0.1.0), but installing version 0.10.8
DEPRECATION: Dependency Links processing has been deprecated and will be removed in a future release.

Aside from the deprecation warnings, pip simply ignores the commit tag and installs 0.10.8, which caused the above problem. Perhaps this was caused by my pip version? I use 18.1.

@lmzintgraf thanks for the logs, I'll have to look into this further.

In the meantime, if you have any issues using the latest versions of Gym and Baselines with our code, you can use the specific commits we tested with (ie the versions linked in setup.py) with the following:

# inside the same virtualenv you setup
pip3 uninstall gym baselines

git clone https://github.com/openai/gym.git
cd gym
git checkout 094e6b8e6a102644667d53d9dac6f2245bf80c6f
pip3 install -e .
cd ..

git clone https://github.com/openai/baselines.git
cd baselines
git checkout 2b0283b9db18c768f8e9fa29fbedc5e48499acc6
pip3 install -e .
cd ..

# pip3 list should now show local installs

(or use the linked docker container)

Great, thank you so much for the help and pointers @cpacker !