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

can't import universe #115

Closed shitian-ni closed 7 years ago

shitian-ni commented 7 years ago

At first I could execute import universe, but had the No registered env with id: flashgames.DuskDrive-v0 issue. I found that I didn't setup docker, so I setup docker but the issue wasn't fixed. Then I followed some posts and deleted the universe directory and reinstalled it using

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

But after I reinstalled universe, I can't import it in python.

Expected behavior

import universe

Actual behavior

Traceback (most recent call last):
  File "test.py", line 1, in <module>
    import universe
  File "/Users/shitian/anaconda/universe/universe/__init__.py", line 22, in <module>
    from universe import error, envs
  File "/Users/shitian/anaconda/universe/universe/envs/__init__.py", line 1, in <module>
    import universe.envs.vnc_env
  File "/Users/shitian/anaconda/universe/universe/envs/vnc_env.py", line 10, in <module>
    from universe.envs import diagnostics
  File "/Users/shitian/anaconda/universe/universe/envs/diagnostics.py", line 2, in <module>
    import fastzbarlight
  File "/Users/shitian/anaconda/lib/python3.5/site-packages/fastzbarlight/__init__.py", line 7, in <module>
    from ._zbarlight import zbar_code_scanner
ImportError: dlopen(/Users/shitian/anaconda/lib/python3.5/site-packages/fastzbarlight/_zbarlight.cpython-35m-darwin.so, 2): Symbol not found: _zbar_image_create
  Referenced from: /Users/shitian/anaconda/lib/python3.5/site-packages/fastzbarlight/_zbarlight.cpython-35m-darwin.so
  Expected in: flat namespace
 in /Users/shitian/anaconda/lib/python3.5/site-packages/fastzbarlight/_zbarlight.cpython-35m-darwin.so

Versions

swallow:universe shitian$ uname -a ; python --version; pip show universe gym tensorflow numpy go-vncdriver Pillow
Darwin swallow.yy.ide.titech.ac.jp 16.3.0 Darwin Kernel Version 16.3.0: Thu Nov 17 20:23:58 PST 2016; root:xnu-3789.31.2~1/RELEASE_X86_64 x86_64
Python 3.5.2 :: Anaconda 4.2.0 (x86_64)
Name: universe
Version: 0.21.2
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/shitian/anaconda/universe
Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson
---
Name: gym
Version: 0.7.2
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: /Users/shitian/anaconda/lib/python3.5/site-packages
Requires: numpy, six, pyglet, requests
---
Name: numpy
Version: 1.11.1
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: NumPy Developers
Author-email: numpy-discussion@scipy.org
License: BSD
Location: /Users/shitian/anaconda/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: /Users/shitian/anaconda/lib/python3.5/site-packages
Requires: numpy
---
Name: Pillow
Version: 3.3.1
Summary: Python Imaging Library (Fork)
Home-page: http://python-pillow.org
Author: Alex Clark (Fork Author)
Author-email: aclark@aclark.net
License: Standard PIL License
Location: /Users/shitian/anaconda/lib/python3.5/site-packages
Requires: 
shitian-ni commented 7 years ago

I found that I have to execute import zbarlight before import fastzbarlight or import universe then there will be no error Python terminal screenshot