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

gym 0.10.8r1 #3

Open
lmzintgraf opened this issue Nov 29, 2018 · 5 comments
Open

gym 0.10.8r1 #3

lmzintgraf opened this issue Nov 29, 2018 · 5 comments

Comments

@lmzintgraf
Copy link

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?

@lmzintgraf
Copy link
Author

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.

@cpacker
Copy link
Contributor

cpacker commented Nov 29, 2018

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).

@lmzintgraf
Copy link
Author

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.

@cpacker
Copy link
Contributor

cpacker commented Nov 29, 2018

@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)

@lmzintgraf
Copy link
Author

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

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

2 participants