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

video_recorder trying to load StringIO with Python 3.5 #40

Closed
muratozkan opened this issue May 1, 2016 · 2 comments
Closed

video_recorder trying to load StringIO with Python 3.5 #40

muratozkan opened this issue May 1, 2016 · 2 comments

Comments

@muratozkan
Copy link

I am using Python 3.5.1 with virtualenvwrapper and a minimal gym installation via:

pip install gym

You can reproduce this issue with the basic CartPole example in introduction:

import gym
env = gym.make('CartPole-v0')
env.reset()
for _ in range(1000):
    env.render()
    env.step(env.action_space.sample()) # take a random action

Running this script results in the following error

  File "cartpole.py", line 1, in <module>
    import gym
  File "/Users/ozkanm/.virtualenvs/gym/lib/python3.5/site-packages/gym/__init__.py", line 4, in <module>
    from gym.core import Env, Space
  File "/Users/ozkanm/.virtualenvs/gym/lib/python3.5/site-packages/gym/core.py", line 4, in <module>
    from gym import error, monitoring
  File "/Users/ozkanm/.virtualenvs/gym/lib/python3.5/site-packages/gym/monitoring/__init__.py", line 1, in <module>
    from gym.monitoring.monitor import Monitor, load_results, monitors as _monitors
  File "/Users/ozkanm/.virtualenvs/gym/lib/python3.5/site-packages/gym/monitoring/monitor.py", line 12, in <module>
    from gym.monitoring import stats_recorder, video_recorder
  File "/Users/ozkanm/.virtualenvs/gym/lib/python3.5/site-packages/gym/monitoring/video_recorder.py", line 9, in <module>
    import StringIO
ImportError: No module named 'StringIO'
@tlbtlbtlb
Copy link
Contributor

Dupe of issue #1. The Python 3 compatibility isn't released to PyPI yet; you have to install from source.

@gdb
Copy link
Collaborator

gdb commented May 1, 2016

(That being said, I'll cut a new release.)

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

3 participants