openai / universe-starter-agent

A starter agent that can solve a number of universe environments.
MIT License
1.1k stars 318 forks source link

Running on Ubuntu17.04: cv2 import problem #107

Closed ikamensh closed 6 years ago

ikamensh commented 7 years ago

When I try to run the train.py as in introduction, I get following problem inside a worker container:

File "worker.py", line 2, in <module>
    import cv2
ImportError: libpng12.so.0: cannot open shared object file: No such file or directory

As a further possibility to improve the package: at first it is quite unclear if the process is running or not - the tmux launches, no error message is displayed - the only hint at the problem is no cpu load. (the error message is inside the tmux sessions for workers)

UPDATE after solving initial dependency problem as described in https://askubuntu.com/questions/900506/stata-14-fails-to-start-on-ubuntu-16-10-with-libpng12-so-0-error-how-do-i-in

I get second one:

  File "worker.py", line 2, in <module>
    import cv2
ImportError: libgtk-x11-2.0.so.0

fixed via apt-get install libgtk2.0-dev

to get next error:

RuntimeError: module compiled against API version 0xb but this version of numpy is 0xa
Traceback (most recent call last):
  File "worker.py", line 3, in <module>
    import go_vncdriver
  File "/home/ikamenshchikov/anaconda/envs/universe-starter-agent/lib/python3.5/site-
packages/go_vncdriver/__init__.py", line 9, in <module>
    from go_vncdriver.go_vncdriver import *
ImportError: numpy.core.multiarray failed to import

This happens despite

import numpy print(numpy.version) 1.11.3

Solution: pip uninstall go_vncdriver then follow instructions to install it from scratch on: https://github.com/openai/go-vncdriver

Result: it launched! :-)

mbavar commented 7 years ago

Just for reference, I encountered similar problems on Ubuntu17.04. The issues got resolved when uninstalled cv2 and numpy and reinstalled them via pip rather than conda.