[suggestion] Easier Installation for Windows
See original GitHub issueTo install this library on Windows 10, one may follow the tutorial, which instructs the user to replace the line gym[atari,classic_control]>=0.10.9
in setup.py by gym[classic_control]>=0.10.9
before installation.
I’ve changed one simple detail in this setup.py that will probably allow the installation on Windows 10 by simply running python setup.py install
in prompt, without needing to ask the user to change a line of the code. At least, it worked fine for me.
Currently, the setup.py code (in lines 105 to 109) is like this:
setup(name='stable_baselines',
packages=[package for package in find_packages()
if package.startswith('stable_baselines')],
install_requires=[
'gym[atari,classic_control]>=0.10.9',
Here is the deal. You can change this piece of code by the following one (not forgeting to import os
):
if os.name == 'nt':
gym_version = 'gym[classic_control]>=0.10.9'
else:
gym_version = 'gym[atari,classic_control]>=0.10.9'
setup(name='stable_baselines',
packages=[package for package in find_packages()
if package.startswith('stable_baselines')],
install_requires=[
gym_version,
In this code, the change that is instructed in the tutorial is now done automatically. This is because of os.name
, which indicates which operating system is running in your machine.
I hope this suggestion can contribute to your project at some level.
Issue Analytics
- State:
- Created 4 years ago
- Comments:8
Top GitHub Comments
This has now been addressed in #506 , along with optional MPI instructions.
Thanks to @HoritaL once more for bringing this up! 😃
It looks like this is the case. I appreciate your attention.