简体   繁体   中英

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. 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:

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.

Here's the link to my own 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

pip install -e .

In Windows Prompt, you can install it by typing

pip install gym --user if you are getting errors. You can find more information at here .

In Anaconda Prompt, I have installed it with the same as before by typing

pip install gym .

Try that, and if you are getting errors type here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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