openai / universe

Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications.
https://universe.openai.com
MIT License
7.45k stars 956 forks source link

ImportError: ... go_vncdriver.so: no suitable image found. Did find: ...go_vncdriver.so: overlapping segments #204

Closed nbro closed 6 years ago

nbro commented 6 years ago

Expected behavior

universe is imported without errors from Python 3.5's console.

Actual behavior

Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import universe
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/cell/Desktop/tests/universe/universe/__init__.py", line 22, in <module>
    from universe import error, envs
  File "/Users/cell/Desktop/tests/universe/universe/envs/__init__.py", line 1, in <module>
    import universe.envs.vnc_env
  File "/Users/cell/Desktop/tests/universe/universe/envs/vnc_env.py", line 19, in <module>
    import go_vncdriver
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/go_vncdriver/__init__.py", line 9, in <module>
    from go_vncdriver.go_vncdriver import *
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/go_vncdriver/go_vncdriver.so, 2): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/go_vncdriver/go_vncdriver.so: overlapping segments
    /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/go_vncdriver/go_vncdriver.so: overlapping segments

Versions

Darwin Nelsons-MacBook-Pro.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 2017; root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Python 3.5.0
Name: universe
Version: 0.21.5
Summary: Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications.
Home-page: https://github.com/openai/universe
Author: OpenAI
Author-email: universe@openai.com
License: UNKNOWN
Location: /Users/cell/Desktop/tests/universe
Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson
---
Name: gym
Version: 0.9.3
Summary: The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents.
Home-page: https://github.com/openai/gym
Author: OpenAI
Author-email: gym@openai.com
License: UNKNOWN
Location: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requires: numpy, requests, six, pyglet
---
Name: tensorflow
Version: 1.3.0
Summary: TensorFlow helps the tensors flow
Home-page: http://tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requires: tensorflow-tensorboard, six, wheel, numpy, protobuf
---
Name: numpy
Version: 1.13.1
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: NumPy Developers
Author-email: numpy-discussion@python.org
License: BSD
Location: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requires: 
---
Name: go-vncdriver
Version: 0.4.19
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requires: numpy
---
Name: Pillow
Version: 4.2.1
Summary: Python Imaging Library (Fork)
Home-page: https://python-pillow.org
Author: Alex Clark (Fork Author)
Author-email: aclark@aclark.net
License: Standard PIL License
Location: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages
Requires: olefile

I want to try universe. I'm following this guide. I ran the following commands:

git clone https://github.com/openai/universe
sudo pip install -e universe

I run pip with sudo because I was having some "permission errors". Then I also executed the following command:

sudo docker run --privileged --cap-add=SYS_ADMIN --ipc=host -p 5900:5900 -p 15900:15900 quay.io/openai/universe.flashgames

And I keep receiving messages on the terminal (I guess, as expected).

Now, I was trying to run the following code

import gym
import universe # register Universe environments into Gym

env = gym.make('flashgames.DuskDrive-v0') # any Universe [environment ID](https://github.com/openai/universe/blob/master/universe/__init__.py#L297) here
# If using docker-machine, replace "localhost" with your Docker IP
env.configure(remotes="vnc://localhost:5900+15900")
observation_n = env.reset()

while True:
  # agent which presses the Up arrow 60 times per second
  action_n = [[('KeyEvent', 'ArrowUp', True)] for _ in observation_n]
  observation_n, reward_n, done_n, info = env.step(action_n)
  env.render()

saved in a file run.py using python3.5, but I get the same error as the one I'm describing above when trying to import universe. The reason I'm using python3.5 instead of python is because python is actually attached to a Python2.7 distribution.

nbro commented 6 years ago

Same error as in https://github.com/openai/universe/issues/167.

nbro commented 6 years ago

@gdb Why did you close this issue? At least, I think, you should add a comment to this issue stating that a solution is explained in the other issue.