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

python3 #1

Closed
flavius-popan opened this issue Apr 27, 2016 · 7 comments
Closed

python3 #1

flavius-popan opened this issue Apr 27, 2016 · 7 comments
Assignees

Comments

@flavius-popan
Copy link

It would be great if gym could support python3 for future proofing and supporting transition efforts.

@goaaron
Copy link

goaaron commented Apr 27, 2016

I'm able to run all of the example simulations if I initalize imports wherver you see StringIO, xrange, and urlparse with:

try:
import StringIO #(if cStringIo I import ByteIO)
except ImportError:
from io import StringIO

try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse

try:
xrange
except NameError:
xrange = range

I'm sure there are other dependencies and this is bad, but I'm able to play around.

@rbcode-zz
Copy link

As someone who isn't familiar with this stuff but is eager to learn, why doesn't it work correctly with 3.5+? What is the advantage of 2.7?

@jonasschneider jonasschneider self-assigned this Apr 27, 2016
@HWiese1980
Copy link

No real advantage of 2 over 3 actually. Quite the opposite usually. There are just some incompatible/deprecated modules/keywords/libraries like StringIO, urlparse, xrange...

@lrvdijk
Copy link

lrvdijk commented Apr 28, 2016

A library like python-future makes writing both py2 and py3 compatible code a bit easier.

@adeze
Copy link

adeze commented Apr 28, 2016

is there a pull request with the changes?
I've been making changes to the source locally.. but i suck at git/vcs so i'd rather it not be me

@jonasschneider
Copy link
Contributor

Pull request for this: #22
If you find the time, would be great if somebody besides me could check out the source and poke at it to try and find obvious bugs.

@jonasschneider
Copy link
Contributor

Merged! Python 3 support is experimental, for now. Check out the instructions on https://github.com/openai/gym to clone the repo (didn't cut a new release for pip install yet).
Bug reports are greatly appreciated!

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

7 participants