question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[suggestion] Easier Installation for Windows

See original GitHub issue

To 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:closed
  • Created 4 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
Miffylicommented, Oct 11, 2019

This has now been addressed in #506 , along with optional MPI instructions.

Thanks to @HoritaL once more for bringing this up! 😃

1reaction
HoritaLcommented, Oct 10, 2019

It looks like this is the case. I appreciate your attention.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change your app recommendation settings in Windows
Go to Settings > Apps > Apps & features to change whether you're shown app recommendations when trying to install apps from outside...
Read more >
Windows Installer Best Practices - Win32 apps | Microsoft Learn
This section enumerates a list of tips, linked to the main Windows Installer SDK documentation, to help Application Developers, ...
Read more >
Enable text suggestions in Windows - Microsoft Support
Enable text suggestions in Windows · Select (Start) > Settings. · In the Windows settings, select Time & language. · In the Time...
Read more >
Why am I getting this "Let's finish setting up your device" blue ...
Go to Settings > System > Notifications & actions and uncheck Suggest ways I can finish setting up my device to get the...
Read more >
Ways to install Windows 11 - Microsoft Support
Learn how to install Windows 11, including the recommended option of visiting the Windows Update page in Settings.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found