Having trouble installing requirements

I want to use the git hub project linked down below but whenever I try installing the packages it gives me the error ill also show below.

GitHub - strcoder4007/Mario-Reinforcement-Learning: Training a Mario reinforcement learning agent using Open AI Gym and Stable Baselines 3 PPO algorithm.](I want to use the git hub project linked down below but whenever I try installing the packages it gives me the error ill also show below GitHub - strcoder4007/Mario-Reinforcement-Learning: Training a Mario reinforcement learning agent using Open AI Gym and Stable Baselines 3 PPO algorithm.)

pip install -r requirements.txt
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [3 lines of output]
      C:\Users\hites\AppData\Local\Temp\pip-build-env-a0rnv9wt\overlay\Lib\site-packages\setuptools\_distutils\dist.py:261: UserWarning: Unknown distribution option: 'tests_require'
        warnings.warn(msg)
      error in gym setup command: 'extras_require' must be a dictionary whose values are strings or lists of strings containing valid project/version requirement specifiers.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.```

This looks to be due to using newer setuptools. They dropped support for test_require here: Remove test command by jaraco · Pull Request #4458 · pypa/setuptools · GitHub which looks like it was released in v72.0.0: History - setuptools 75.1.1.post20241015 documentation

You’ll probably need to pin setuptools lower than that version to have success. I won’t say more. As part of your welcome to Python packaging I think it’s best to dig in and learn what’s going on because it’s a jungle and canned answers will not serve you well. The jungle is not going away any time soon.

Good luck!

1 Like