Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install OpenAI Universe without getting error code 1 on Windows?

When I try to install OpenAi Universe on my Windows machine via python pip I get following stacktrace:

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Me\AppData\Local\Temp\pip-build-yjf_mrwx\fastzbarlight\setup.py", line 49, in <module>
        proc = subprocess.Popen(['ld', '-liconv'], stderr=subprocess.PIPE)
      File "E:\Python3.5.2\lib\subprocess.py", line 947, in __init__
        restore_signals, start_new_session)
      File "E:\Python3.5.2\lib\subprocess.py", line 1224, in _execute_child
        startupinfo)
    FileNotFoundError: [WinError 2] The system cannot find the file specified

And this error code:

Command "python setup.py egg_info" failed with error code 1 in C:\Users\Me\AppData\Local\Temp\pip-build-yjf_mrwx\fastzbarlight\

I tried everything mentioned here. I also read through the documentation and found this:

"While we don’t officially support Windows, we expect our code to be very close to working there. We’d be happy to take pull requests that take our Windows compatibility to 100%."

So I guess it might just not work, but I think that it should work.

like image 873
creativecreatorormaybenot Avatar asked Dec 16 '16 23:12

creativecreatorormaybenot


1 Answers

Currently, Universe is not officially supported on Windows machines. You can, however, use the Linux subsystem for Windows to install both Gym and Universe with no real issues. Basically, all you need to do is to follow these instructions that were adapted from this comment by MaxOSmith from Gym on GitHub (I was able to use them to install Universe as well):

  1. Update to the latest version of Windows (>version 1607, "Anniversary Update").

  2. Enable Windows Subsystem for Linux (WSL).

  3. Open cmd, run bash.

  4. Install Python, Gym and Universe (using sudo, and NOT PIP). Also make sure to look at the system requirements and follow the typical Universe Linux install, aka get golang etc.

  5. Install vcXsrv, and run it (you should just have a little tray icon). We install this because WSL is not supported and it can cause some crazy graphical errors to occur.

  6. In bash, run

    export DISPLAY=:0
    

    Now, when you run it you should get a display to pop-up, there may be issues related to graphics drivers. Sadly, this is where the instructions diverge if you don't have an NVIDIA graphics card.

  7. Get the drivers:

    sudo apt-get install nvidia-319 nvidia-settings-319 nvidia-prime
    
  8. Play with it.

As an aside, I plan to start contributing to Universe and the first thing I want to do is make it work naively on Windows.

like image 158
Abeltensor Avatar answered Oct 24 '22 09:10

Abeltensor