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

假如想象 提交于 2021-02-04 13:26:07

问题


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.


回答1:


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.




回答2:


I am new to this domain, but I tried googled a lot and I think I found an answer which worked for me from a forum it suggests to comment #'fastzbarlight>=0.0.13', and run the pip command then it worked. that package is for QR code readings.... So unless you want that option but need to test in the windows environment ... have a try....

this is the link Git_hub forum link--openai/universe/issues



来源:https://stackoverflow.com/questions/41193650/how-to-install-openai-universe-without-getting-error-code-1-on-windows

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!