Kautenja / gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES
Other
678 stars 133 forks source link

Can't install this package by pip in ubuntu16 #133

Open yingshaoxo opened 1 month ago

yingshaoxo commented 1 month ago

It will report an error: gym can't get installed.

I suggest you remove any dependencies, such as 'nes-py', because it has too many useless dependencies:

# copied from nes-py setup.py
    install_requires=[
        'gym>=0.17.2',
        'numpy>=1.18.5',
        'pyglet<=1.5.21,>=1.4.0',
        'tqdm>=4.48.2',
    ],

Why they require gym as a nes_emulator? Why they require numpy if they write the core by using c? If they can print a number, why they use tqdm? Why they want to display a image on screen if they could give python caller function a image, they can not use pyglet.

Hopy someone could fork a nes-py, and remove all its dependencies, and make sure it is working in ubuntu16 or any machine that has gcc.

yingshaoxo commented 1 month ago

The current workable solution is:

#install miniconda

pip install gym-super-mario-bros=7.4.0

pip install gym==0.17.2 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install numpy==1.26 -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install pillow -i https://pypi.tuna.tsinghua.edu.cn/simple

conda install -c conda-forge gcc

But in the future, this may not work at all. Can anyone drop all dependencies for gym_super_mario_bros to let it work just with a pure python version, for example, python3.10?