简体   繁体   English

创建并安装自己的 OpenAI Gym 环境

[英]Create and Install own OpenAI Gym Environment

I currently runs Spyder Python editor under Anaconda 3. I have followed the instruction from the link below to create my test gym environment.我目前在 Anaconda 3 下运行 Spyder Python 编辑器。我按照以下链接中的说明创建了我的测试健身房环境。 https://github.com/openai/gym/tree/master/gym/envs#how-to-create-new-environments-for-gym https://github.com/openai/gym/tree/master/gym/envs#how-to-create-new-environments-for-gym

However, when I try to install it using the codes below in the Anaconda Prompt as administrator:但是,当我尝试以管理员身份在 Anaconda Prompt 中使用以下代码安装它时:

pip install gym
pip install -e .

All I got was an error message of "Directory '.'我得到的只是“目录”的错误消息。 is not installable. File 'setup.py' not found. Even know I have setup.py in the root folder.不可安装。找不到文件“setup.py”。甚至知道我在根文件夹中有 setup.py。

Here's the link to my own gym: https://github.com/stewegg/DanL-gym这是我自己的健身房的链接: https : //github.com/stewegg/DanL-gym

Can someone assist me with this issue?有人可以帮助我解决这个问题吗? Thank you.谢谢你。

I have also some problems with installing my own enviroments.我在安装自己的环境时也遇到了一些问题。 But in my path of troubleshooting I crashed in same problems as you did.但是在我的故障排除过程中,我遇到了与您相同的问题。 The line线

File 'setup.py' not found.

explains what the problem is very good.很好的说明了什么问题。 You have to change you path to the directory where your setup.py File is located and then run您必须将路径更改为setup.py文件所在的目录,然后运行

pip install -e .

In Windows Prompt, you can install it by typing在 Windows Prompt 中,您可以通过键入来安装它

pip install gym --user if you are getting errors. pip install gym --user如果你遇到错误。 You can find more information at here .您可以在此处找到更多信息。

In Anaconda Prompt, I have installed it with the same as before by typing在 Anaconda Prompt 中,我通过键入与以前相同的方式安装了它

pip install gym . pip install gym

Try that, and if you are getting errors type here.尝试一下,如果您遇到错误,请在此处输入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM