It would be great if gym could support python3 for future proofing and supporting transition efforts.
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.
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?
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...
A library like python-future makes writing both py2 and py3 compatible code a bit easier.
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
Pull request for this: https://github.com/openai/gym/pull/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.
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!
Most helpful comment
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!