Coder Social home page Coder Social logo

nes-py's People

Contributors

dman82499 avatar f4kill avatar fo40225 avatar kautenja avatar lucasschoenhold avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

nes-py's Issues

An error occurs

hello, here is an error when I was using nes_py

File "/home/anaconda3/envs/pytorch/lib/python3.8/ctypes/init.py", line 373, in init
self._handle = _dlopen(self._name, mode)
OSError: /home/anaconda3/envs/pytorch/lib/python3.8/site-packages/nes_py/lib_nes_env.cpython-38-x86_64-linux-gnu.so: undefined symbol: _ZSt28__throw_bad_array_new_lengthv

I don't kwon what's the reason of that, could you please help me with it
thanking you for your reply.

Install fails on OS X with Xcode 10 Command Line Tools

Describe the bug

Installation fails on OS X with Xcode 10, due to stdlibc++ no longer supported.

To Reproduce

Steps to reproduce the behavior:

  1. run pip install nes-py on OS X with Xcode 10 and no cruft present from prior Xcode installs

Expected behavior

Install should succeed

Environment

  • Operating System: OS X
  • Python version: 3.7.3
  • C++ compiler and version: clang++ 10.0.1

Additional context

Error that occurs is:

    nes_py/nes/include/cartridge.hpp:12:10: fatal error: 'vector' file not found
    #include <vector>
             ^~~~~~~~
    1 warning and 1 error generated.
    error: command 'gcc' failed with exit status 1

This is similar to https://github.com/pandas-dev/pandas/pull/24274/files, and a similar solution could work.

I was able to get around the issue by doing:

MACOSX_DEPLOYMENT_TARGET=10.9 pip install nes-py

gym_super_mario_bros.make('SuperMarioBros-v0') breaks access to globals from thread

Describe the bug

gym_super_mario_bros.make('SuperMarioBros-v0') breaks access to globals from thread

To Reproduce

import threading
import gym_super_mario_bros
from gym_super_mario_bros.actions import COMPLEX_MOVEMENT
from nes_py.wrappers import BinarySpaceToDiscreteSpaceEnv

GLOBAL_THREADS = 10

def makeEnv(thread_index):
    #Works
    print(BinarySpaceToDiscreteSpaceEnv)
    print(COMPLEX_MOVEMENT)
    print(GLOBAL_THREADS)
    
    env = gym_super_mario_bros.make('SuperMarioBros-v0')
    
    #Broken (uncomment in one by one)
    print(BinarySpaceToDiscreteSpaceEnv)
    #print(COMPLEX_MOVEMENT)
    #print(GLOBAL_THREADS)
    
    env = BinarySpaceToDiscreteSpaceEnv(env, COMPLEX_MOVEMENT)
    env.reset()
    print("makeEnv %d: success" % (thread_index))
    return env

for i in range(GLOBAL_THREADS):
    t = threading.Thread(target=makeEnv,args=(i,))
    t.start()

(Yes, I know that the example is nonsense and throws any successfully created envs in the garbage.)

Note that this fails even with one thread.

Environment

  • Operating System: Windows 10 x64
  • Python version: 3.6.7
  • C++ compiler and version: Visual Studio 2017

2 Player Support

Is your feature request related to a problem? Please describe.

The NES supports 2 players and the current code-base makes this a doable feature.

Describe the solution you'd like

The ability to play 2 player games using this environment

Describe alternatives you've considered

NA

Additional context

NA

Plot Visualization

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

A render mode that utilizes the x y position of Mario and static maps of each level to plot a simple point on a graph. Each episode could overlay as an "extended exposure" of the training, validation, or testing procedure.

Describe alternatives you've considered

NA

Additional context

DeepMind implement a similar visualization for Sonic. See this 2 minute paper on Benign AI

Client API

There needs to be an intuitive client API for polymorphism used by individual game environments.

Nes-py not installing on Ubuntu

Describe the bug

The package fails to install on Ubuntu 20.04 using pip.

To Reproduce

Steps to reproduce the behavior:

  1. Ensure nes-py is not installed.
  2. Run pip install nes-py.

Expected behavior

Install for use.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: Ubuntu 20.04
  • Python version: 3.9
  • C++ compiler and version: clang

Additional context

This is what shows in the terminal:

Collecting nes-py
  Using cached nes_py-8.1.8.tar.gz (76 kB)
Requirement already satisfied: gym>=0.17.2 in ./anaconda3/lib/python3.9/site-packages (from nes-py) (0.21.0)
Requirement already satisfied: numpy>=1.18.5 in ./anaconda3/lib/python3.9/site-packages (from nes-py) (1.20.3)
Requirement already satisfied: pyglet<=1.5.11,>=1.4.0 in ./anaconda3/lib/python3.9/site-packages (from nes-py) (1.5.11)
Requirement already satisfied: tqdm>=4.48.2 in ./anaconda3/lib/python3.9/site-packages (from nes-py) (4.62.3)
Requirement already satisfied: cloudpickle>=1.2.0 in ./anaconda3/lib/python3.9/site-packages (from gym>=0.17.2->nes-py) (2.0.0)
Building wheels for collected packages: nes-py
  Building wheel for nes-py (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/aarav18/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-6002ztr4
       cwd: /tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/
  Complete output (27 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/nes_py
  copying nes_py/nes_env.py -> build/lib.linux-x86_64-3.9/nes_py
  copying nes_py/_image_viewer.py -> build/lib.linux-x86_64-3.9/nes_py
  copying nes_py/__init__.py -> build/lib.linux-x86_64-3.9/nes_py
  copying nes_py/_rom.py -> build/lib.linux-x86_64-3.9/nes_py
  creating build/lib.linux-x86_64-3.9/nes_py/app
  copying nes_py/app/play_random.py -> build/lib.linux-x86_64-3.9/nes_py/app
  copying nes_py/app/cli.py -> build/lib.linux-x86_64-3.9/nes_py/app
  copying nes_py/app/play_human.py -> build/lib.linux-x86_64-3.9/nes_py/app
  copying nes_py/app/__init__.py -> build/lib.linux-x86_64-3.9/nes_py/app
  creating build/lib.linux-x86_64-3.9/nes_py/wrappers
  copying nes_py/wrappers/joypad_space.py -> build/lib.linux-x86_64-3.9/nes_py/wrappers
  copying nes_py/wrappers/__init__.py -> build/lib.linux-x86_64-3.9/nes_py/wrappers
  running build_ext
  building 'nes_py.lib_nes_env' extension
  creating build/temp.linux-x86_64-3.9
  creating build/temp.linux-x86_64-3.9/nes_py
  creating build/temp.linux-x86_64-3.9/nes_py/nes
  creating build/temp.linux-x86_64-3.9/nes_py/nes/src
  creating build/temp.linux-x86_64-3.9/nes_py/nes/src/mappers
  g++ -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/aarav18/anaconda3/include -I/home/aarav18/anaconda3/include -fPIC -O2 -isystem /home/aarav18/anaconda3/include -fPIC -Ines_py/nes/include -I/home/aarav18/anaconda3/include/python3.9 -c nes_py/nes/src/cartridge.cpp -o build/temp.linux-x86_64-3.9/nes_py/nes/src/cartridge.o -std=c++1y -march=native -pipe -O3
  error: command 'g++' failed: No such file or directory
  ----------------------------------------
  ERROR: Failed building wheel for nes-py
  Running setup.py clean for nes-py
Failed to build nes-py
Installing collected packages: nes-py
    Running setup.py install for nes-py ... error
    ERROR: Command errored out with exit status 1:
     command: /home/aarav18/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-bcnc_dx3/install-record.txt --single-version-externally-managed --compile --install-headers /home/aarav18/anaconda3/include/python3.9/nes-py
         cwd: /tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/
    Complete output (27 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/nes_py
    copying nes_py/nes_env.py -> build/lib.linux-x86_64-3.9/nes_py
    copying nes_py/_image_viewer.py -> build/lib.linux-x86_64-3.9/nes_py
    copying nes_py/__init__.py -> build/lib.linux-x86_64-3.9/nes_py
    copying nes_py/_rom.py -> build/lib.linux-x86_64-3.9/nes_py
    creating build/lib.linux-x86_64-3.9/nes_py/app
    copying nes_py/app/play_random.py -> build/lib.linux-x86_64-3.9/nes_py/app
    copying nes_py/app/cli.py -> build/lib.linux-x86_64-3.9/nes_py/app
    copying nes_py/app/play_human.py -> build/lib.linux-x86_64-3.9/nes_py/app
    copying nes_py/app/__init__.py -> build/lib.linux-x86_64-3.9/nes_py/app
    creating build/lib.linux-x86_64-3.9/nes_py/wrappers
    copying nes_py/wrappers/joypad_space.py -> build/lib.linux-x86_64-3.9/nes_py/wrappers
    copying nes_py/wrappers/__init__.py -> build/lib.linux-x86_64-3.9/nes_py/wrappers
    running build_ext
    building 'nes_py.lib_nes_env' extension
    creating build/temp.linux-x86_64-3.9
    creating build/temp.linux-x86_64-3.9/nes_py
    creating build/temp.linux-x86_64-3.9/nes_py/nes
    creating build/temp.linux-x86_64-3.9/nes_py/nes/src
    creating build/temp.linux-x86_64-3.9/nes_py/nes/src/mappers
    g++ -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -Wall -fPIC -O2 -isystem /home/aarav18/anaconda3/include -I/home/aarav18/anaconda3/include -fPIC -O2 -isystem /home/aarav18/anaconda3/include -fPIC -Ines_py/nes/include -I/home/aarav18/anaconda3/include/python3.9 -c nes_py/nes/src/cartridge.cpp -o build/temp.linux-x86_64-3.9/nes_py/nes/src/cartridge.o -std=c++1y -march=native -pipe -O3
    error: command 'g++' failed: No such file or directory
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/aarav18/anaconda3/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_hz2dbag/nes-py_5302c463721c4d36bad296d6b1556a34/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-bcnc_dx3/install-record.txt --single-version-externally-managed --compile --install-headers /home/aarav18/anaconda3/include/python3.9/nes-py Check the logs for full command output.

2.0.1 fails to install on Ubuntu 16.04

Describe the bug

the package fails to install from pip on a machine running Ubuntu 16.04 with appropriate C++ libraries

To Reproduce

Steps to reproduce the behavior:

  1. ensure nes-py is not installed
  2. run python3 -m pip install nes-py==2.0.1
  3. witness install failure

Expected behavior

Install for use

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: Ubuntu 16.04
  • Python version: 3.5.2
  • C++ compiler and version: clang
  • nes-gym version: ?

Additional context

2.0.0 will install successfully

Logo

The README could use a catchy marketing logo

It seems that render() works even inside thread.

It seems that render() works even inside a thread. Just remember to get rid of the exception by removing the following lines:

import threading
if threading.current_thread() is not threading.main_thread():
msg = 'rendering from python threads is not supported'
raise RuntimeError(msg)

A sample code is shown below:

import os
os.environ['OMP_NUM_THREADS'] = '1'

import threading
import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from nes_py.wrappers import JoypadSpace


def dummy_fun(steps):
    import numpy as np
    rng = np.random.default_rng(steps)
    sum = 0.0
    for _ in range(steps):
        rfloat = rng.random()
        sum += rfloat
    print(f'sum {sum}')


def do_something(steps):
    print('inside do_something')
    env = JoypadSpace(gym_super_mario_bros.make('SuperMarioBros-1-1-v0', new_step_api=False), SIMPLE_MOVEMENT)
    done = True
    for _ in range(steps):
        if done:
            state = env.reset()
        state, reward, done, info = env.step(env.action_space.sample())
        env.render()
    print(f'state shape {state.shape}')
    env.close()


def main():
    steps = 5000
    thread1 = threading.Thread(
        target=dummy_fun,
        args=(
            steps,
        ),
    )
    thread1.start()

    thread2 = threading.Thread(
        target=do_something,
        args=(
            steps,
        ),
    )
    thread2.start()

    thread1.join()
    thread2.join()


if __name__ == '__main__':
    main()

Below is the screenshot:
Screenshot

Improperly formatted ROMs

I am trying to get the emulator set up, but every ROM I try is returning the "ROM header zero fill bytes are not zero" error. I have seen in a previous issue on this project that this is due to an improperly formatted ROM, but is there any way to format the ROMs myself? If not, is there anywhere that does have the properly formatted ROMs?

Thanks.

Get OSError: exception: access violation reading memory When multithreading

Got os access violation reading error when try to train my model use multi-threading.
When the program try to call the pyd.
I am using 64-win10, py3.7, and NES-PY 7.0.1
File "D:\py37\lib\site-packages\nes_py\nes_env.py", line 259, in reset
self._restore()
File "D:\py37\lib\site-packages\nes_py\nes_env.py", line 221, in _restore
_LIB.Restore(self._env)
OSError: exception: access violation reading 0x000001DFDBDC8E30

Support Parallelism

Is your feature request related to a problem? Please describe.

The gym environments don't support parallelism well using threading or same thread initialization.

Describe the solution you'd like

A refactor of the C++ code to allow for better data containment and thus allow for multiple environments to run in the same thread.

Describe alternatives you've considered

NA

Additional context

multiprocessing works, but threading and same thread initialization fails.

Failed to install 'nes-py'

Describe the bug

Failed to install 'nes-py'.

Environment

  • Operating System: Mac v10.15.7
  • Python version: 3.8.2
  • IDE is pycharm v2022.1, failed using the python package installer and pip.

Additional context

Full error message below, perhaps this doesn't work on 64bit processors?

Collecting nes-py
Using cached nes_py-8.2.1.tar.gz (77 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: gym>=0.17.2 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from nes-py) (0.26.2)
Requirement already satisfied: numpy>=1.18.5 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from nes-py) (1.23.4)
Requirement already satisfied: pyglet<=1.5.21,>=1.4.0 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from nes-py) (1.5.0)
Requirement already satisfied: tqdm>=4.48.2 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from nes-py) (4.64.1)
Requirement already satisfied: gym-notices>=0.0.4 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from gym>=0.17.2->nes-py) (0.0.8)
Requirement already satisfied: cloudpickle>=1.2.0 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from gym>=0.17.2->nes-py) (1.3.0)
Requirement already satisfied: importlib-metadata>=4.8.0 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from gym>=0.17.2->nes-py) (4.13.0)
Requirement already satisfied: future in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from pyglet<=1.5.21,>=1.4.0->nes-py) (0.18.2)
Requirement already satisfied: zipp>=0.5 in /Users/AZC4063/Dropbox/My Mac (Tyler’s iMac)/Desktop/Code/venv/lib/python3.8/site-packages (from importlib-metadata>=4.8.0->gym>=0.17.2->nes-py) (3.9.0)
Building wheels for collected packages: nes-py
Building wheel for nes-py (setup.py): started
Building wheel for nes-py (setup.py): finished with status 'error'
Running setup.py clean for nes-py
Failed to build nes-py
Installing collected packages: nes-py
Running setup.py install for nes-py: started
Running setup.py install for nes-py: finished with status 'error'

error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [146 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-x86_64-3.8
creating build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/nes_env.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/init.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/_image_viewer.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/_rom.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
creating build/lib.macosx-10.14.6-x86_64-3.8/nes_py/wrappers
copying nes_py/wrappers/joypad_space.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/wrappers
copying nes_py/wrappers/init.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/wrappers
creating build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/init.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/play_random.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/cli.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/play_human.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  creating build/temp.macosx-10.14.6-x86_64-3.8
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes/src
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes/src/mappers
  g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Ines_py/nes/include -I/Users/AZC4063/Desktop/Code/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c nes_py/nes/src/cartridge.cpp -o build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes/src/cartridge.o -std=c++1y -pipe -O3
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
  #error Unsupported architecture
   ^
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
  #error architecture not supported
   ^
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_dev_t;         /* dev_t */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
  typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
  typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
  typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
          ^
  note: '__uint128_t' declared here
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_wctype_t;
          ^
  note: '__uint128_t' declared here
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:75:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
  typedef __darwin_size_t        size_t;
          ^
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:76:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_mbstate_t.h:31:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
  #error architecture not supported
   ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  error: command '/usr/bin/g++' failed with exit code 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for nes-py
error: subprocess-exited-with-error

× Running setup.py install for nes-py did not run successfully.
│ exit code: 1
╰─> [148 lines of output]
running install
/Users/AZC4063/Desktop/Code/venv/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.14.6-x86_64-3.8
creating build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/nes_env.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/init.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/_image_viewer.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
copying nes_py/_rom.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py
creating build/lib.macosx-10.14.6-x86_64-3.8/nes_py/wrappers
copying nes_py/wrappers/joypad_space.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/wrappers
copying nes_py/wrappers/init.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/wrappers
creating build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/init.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/play_random.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/cli.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
copying nes_py/app/play_human.py -> build/lib.macosx-10.14.6-x86_64-3.8/nes_py/app
warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  creating build/temp.macosx-10.14.6-x86_64-3.8
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes/src
  creating build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes/src/mappers
  g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -Ines_py/nes/include -I/Users/AZC4063/Desktop/Code/venv/include -I/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c nes_py/nes/src/cartridge.cpp -o build/temp.macosx-10.14.6-x86_64-3.8/nes_py/nes/src/cartridge.o -std=c++1y -pipe -O3
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:32:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/cdefs.h:807:2: error: Unsupported architecture
  #error Unsupported architecture
   ^
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:33:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/_types.h:34:2: error: architecture not supported
  #error architecture not supported
   ^
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:27:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:55:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_blkcnt_t;      /* total blocks */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:56:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_blksize_t;     /* preferred block size */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:57:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_dev_t;         /* dev_t */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:60:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_gid_t;         /* [???] process and group IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:61:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_id_t;          /* [XSI] pid_t, uid_t, or gid_t*/
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:62:9: error: unknown type name '__uint64_t'
  typedef __uint64_t      __darwin_ino64_t;       /* [???] Used for 64 bit inodes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:68:9: error: unknown type name '__darwin_natural_t'
  typedef __darwin_natural_t __darwin_mach_port_name_t; /* Used by mach */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:70:9: error: unknown type name '__uint16_t'; did you mean '__uint128_t'?
  typedef __uint16_t      __darwin_mode_t;        /* [???] Some file attributes */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:71:9: error: unknown type name '__int64_t'
  typedef __int64_t       __darwin_off_t;         /* [???] Used for file sizes */
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:72:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_pid_t;         /* [???] process and group IDs */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:73:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_sigset_t;      /* [???] signal set */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:74:9: error: unknown type name '__int32_t'; did you mean '__int128_t'?
  typedef __int32_t       __darwin_suseconds_t;   /* [???] microseconds */
          ^
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
          ^
  note: '__uint128_t' declared here
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:70:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_wctype_t;
          ^
  note: '__uint128_t' declared here
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:75:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_size_t.h:31:9: error: unknown type name '__darwin_size_t'
  typedef __darwin_size_t        size_t;
          ^
  In file included from nes_py/nes/src/cartridge.cpp:8:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/fstream:183:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ostream:138:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/ios:214:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/iosfwd:95:
  In file included from /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/wchar.h:118:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/wchar.h:76:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_mbstate_t.h:31:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
  #error architecture not supported
   ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  error: command '/usr/bin/g++' failed with exit code 1
  [end of output]

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

× Encountered error while trying to install package.
╰─> nes-py

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Not working with Python311

Describe the bug

pip install nes-py
Collecting nes-py
  Using cached nes_py-8.2.1.tar.gz (77 kB)
  Preparing metadata (setup.py) ... done
Collecting gym>=0.17.2 (from nes-py)
  Using cached gym-0.26.2-py3-none-any.whl
Requirement already satisfied: numpy>=1.18.5 in e:\python311-venv\lib\site-packages (from nes-py) (1.25.0)
Collecting pyglet<=1.5.21,>=1.4.0 (from nes-py)
  Using cached pyglet-1.5.21-py3-none-any.whl.metadata (7.6 kB)
Requirement already satisfied: tqdm>=4.48.2 in e:\python311-venv\lib\site-packages (from nes-py) (4.66.1)
Collecting cloudpickle>=1.2.0 (from gym>=0.17.2->nes-py)
  Using cached cloudpickle-3.0.0-py3-none-any.whl.metadata (7.0 kB)
Collecting gym-notices>=0.0.4 (from gym>=0.17.2->nes-py)
  Using cached gym_notices-0.0.8-py3-none-any.whl.metadata (1.0 kB)
Requirement already satisfied: colorama in e:\python311-venv\lib\site-packages (from tqdm>=4.48.2->nes-py) (0.4.6)
Using cached pyglet-1.5.21-py3-none-any.whl (1.1 MB)
Using cached cloudpickle-3.0.0-py3-none-any.whl (20 kB)
Using cached gym_notices-0.0.8-py3-none-any.whl (3.0 kB)
Building wheels for collected packages: nes-py
  Building wheel for nes-py (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-cpython-311
      creating build\lib.win-amd64-cpython-311\nes_py
      copying nes_py\nes_env.py -> build\lib.win-amd64-cpython-311\nes_py
      copying nes_py\_image_viewer.py -> build\lib.win-amd64-cpython-311\nes_py
      copying nes_py\_rom.py -> build\lib.win-amd64-cpython-311\nes_py
      copying nes_py\__init__.py -> build\lib.win-amd64-cpython-311\nes_py
      creating build\lib.win-amd64-cpython-311\nes_py\app
      copying nes_py\app\cli.py -> build\lib.win-amd64-cpython-311\nes_py\app
      copying nes_py\app\play_human.py -> build\lib.win-amd64-cpython-311\nes_py\app
      copying nes_py\app\play_random.py -> build\lib.win-amd64-cpython-311\nes_py\app
      copying nes_py\app\__init__.py -> build\lib.win-amd64-cpython-311\nes_py\app
      creating build\lib.win-amd64-cpython-311\nes_py\wrappers
      copying nes_py\wrappers\joypad_space.py -> build\lib.win-amd64-cpython-311\nes_py\wrappers
      copying nes_py\wrappers\__init__.py -> build\lib.win-amd64-cpython-311\nes_py\wrappers
      running build_ext
      building 'nes_py.lib_nes_env' extension
      creating build\temp.win-amd64-cpython-311
      creating build\temp.win-amd64-cpython-311\Release
      creating build\temp.win-amd64-cpython-311\Release\nes_py
      creating build\temp.win-amd64-cpython-311\Release\nes_py\nes
      creating build\temp.win-amd64-cpython-311\Release\nes_py\nes\src
      creating build\temp.win-amd64-cpython-311\Release\nes_py\nes\src\mappers
      cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ines_py/nes/include -IE:\Python311-venv\include -IE:\Python311\include -IE:\Python311\Include /EHsc /Tpnes_py/nes/src/mappers\mapper_CNROM.cpp /Fobuild\temp.win-amd64-cpython-311\Release\nes_py/nes/src/mappers\mapper_CNROM.obj -std=c++1y -pipe -O3
      cl : row command warning D9002 : ignoring option "-std=c++1y"
      cl : row command D9002 : ignoring option "-pipe"
      cl : row command D9002 : ignoring option "-O3"
      mapper_CNROM.cpp
      nes_py/nes/include\common.hpp(13): fatal error C1083: can;t open file: 'cstdint': No such file or directory
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.39.33519\\bin\\Hostx64\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for nes-py
  Running setup.py clean for nes-py
Failed to build nes-py
ERROR: Could not build wheels for nes-py, which is required to install pyproject.toml-based projects

To Reproduce

Steps to reproduce the behavior:

  1. nes_py -r E:\roms\1.nes

Expected behavior

Run simple mario game.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: W11
  • Python version: 311
  • C++ compiler and version:
    C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x86
    C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64

Additional context

nes_py-8.2.1.tar.gz

Solved similar problem in other solutions:
jameskmurphy/nes#3 (comment)

update to gym v26

Gym v26 has made a number of breaking api changes
Could you either limit the gym version or update to the new API.

How to support ROM mapper number which is not supported now

I have two ROM files that prompt separately“

ValueError: ROM has an unsupported mapper number 167. please see #28 for more information”

and

“ValueError: ROM has an unsupported mapper number 241. please see #28 for more information”

How can this simulator support these two ROMs? thank you,

The file can be downloaded here:

您有一份文件待查收!即刻点击链接获取文件:https://cowtransfer.com/s/6f07270f4b5f4a 或进入 cowtransfer.com 获取,在首页输入取件码:371565(24小时内有效)

or I can send E-mail to you. Thanks.

super-mario bug help me

I'm sorry, I can't speak English. I hope you can understand what I said. When I quoted your NES package, it seemed that there was an error in the program. I don't know if it was a problem with the NES package. I would like to ask you to take a look

"""
@author: Viet Nguyen [email protected]
"""

import gym_super_mario_bros
from gym.spaces import Box
from gym import Wrapper
from nes_py.wrappers import JoypadSpace
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT, COMPLEX_MOVEMENT, RIGHT_ONLY
import cv2
import numpy as np
import subprocess as sp
import torch.multiprocessing as mp
import time

class Monitor:
def init(self, width, height, saved_path):

self.command = ["ffmpeg", "-y", "-f", "rawvideo", "-vcodec", "rawvideo", "-s", "{}X{}".format(width, height),
                "-pix_fmt", "rgb24", "-r", "60", "-i", "-", "-an", "-vcodec", "mpeg4", saved_path]
try:
    print(self.command)
    self.pipe = sp.Popen(self.command, stdin=sp.PIPE, stderr=sp.PIPE)
except FileNotFoundError:
    pass

def record(self, image_array):
self.pipe.stdin.write(image_array.tostring())
def process_frame(frame):

if frame is not None:
frame = cv2.cvtColor(frame, cv2.COLOR_RGB2GRAY)
frame = cv2.resize(frame, (84, 84))[None, :, :] / 255.
return frame
else:
return np.zeros((1, 84, 84))
class CustomReward(Wrapper):
def init(self, env=None, monitor=None):
super(CustomReward, self).init(env)
self.observation_space = Box(low=0, high=255, shape=(1, 84, 84))
self.curr_score = 0
if monitor:
self.monitor = monitor
else:
self.monitor = None

def step(self, action):
state, reward, done, info = self.env.step(action)
if self.monitor:
self.monitor.record(state)
state = process_frame(state)
reward += (info["score"] - self.curr_score) / 40.
self.curr_score = info["score"]
if done:
if info["flag_get"]:
reward += 50
else:
reward -= 50
return state, reward / 10., done, info

def reset(self):
self.curr_score = 0
return process_frame(self.env.reset())
class CustomSkipFrame(Wrapper):
def init(self, env, skip=4):
super(CustomSkipFrame, self).init(env)
self.observation_space = Box(low=0, high=255, shape=(skip, 84, 84))
self.skip = skip
self.states = np.zeros((skip, 84, 84), dtype=np.float32)

def step(self, action):
total_reward = 0
last_states = []
for i in range(self.skip):
state, reward, done, info = self.env.step(action)
total_reward += reward
if i >= self.skip / 2:
last_states.append(state)
if done:
self.reset()
return self.states[None, :, :, :].astype(np.float32), total_reward, done, info
max_state = np.max(np.concatenate(last_states, 0), 0)
self.states[:-1] = self.states[1:]
self.states[-1] = max_state
return self.states[None, :, :, :].astype(np.float32), total_reward, done, info

def reset(self):
state = self.env.reset()
self.states = np.concatenate([state for _ in range(self.skip)], 0)

return self.states[None, :, :, :].astype(np.float32)

def create_train_env(world, stage, actions, output_path=None):
env = gym_super_mario_bros.make("SuperMarioBros-{}-{}-v0".format(world, stage))
if output_path:
monitor = Monitor(256, 240, output_path)
else:
monitor = None

env = JoypadSpace(env, actions)
env = CustomReward(env, monitor)
env = CustomSkipFrame(env)

return env
def test():
return "11111111111111111"

class MultipleEnvironments:
def init(self, world, stage, action_type, num_envs, output_path=None):
self.agent_conns, self.env_conns = zip(*[mp.Pipe() for _ in range(num_envs)])
if action_type == "right":
actions = RIGHT_ONLY
elif action_type == "simple":
actions = SIMPLE_MOVEMENT
else:
actions = COMPLEX_MOVEMENT

self.envs = [create_train_env(world, stage, actions, output_path=output_path) for _ in range(num_envs)]

self.num_states = self.envs[0].observation_space.shape[0]

self.num_actions = len(actions)

for index in range(num_envs):
    process = mp.Process(target=self.run, args=(index,))
    process.start()
    print(process.pid)

    # self.env_conns[index].close()

def run(self, index):

# self.agent_conns[index].close()
while True:

    request, action = self.env_conns[index].recv()
    if request == "step":
        self.env_conns[index].send(self.envs[index].step(action.item()))

    elif request == "reset":

        self.env_conns[index].send(self.envs[index].reset())

    else:
        raise NotImplementedError

if name == 'main':
envs = MultipleEnvironments(5, 2, "simple", 2)

envs.envs[0].render()
envs.agent_conns[0].send(("reset", None))
D:\Pycharm\Project\venv\Scripts\python.exe C:/Users/LV/Desktop/Super-mario-bros-PPO-pytorch-master/src/env.py
8408
14212
Process Process-1:
Traceback (most recent call last):
File "D:\python\lib\multiprocessing\process.py", line 297, in _bootstrap
self.run()
File "D:\python\lib\multiprocessing\process.py", line 99, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\LV\Desktop\Super-mario-bros-PPO-pytorch-master\src\env.py", line 156, in run
self.env_conns[index].send(self.envs[index].reset())
File "C:\Users\LV\Desktop\Super-mario-bros-PPO-pytorch-master\src\env.py", line 95, in reset
state = self.env.reset()
File "C:\Users\LV\Desktop\Super-mario-bros-PPO-pytorch-master\src\env.py", line 68, in reset
return process_frame(self.env.reset())
File "D:\python\lib\site-packages\nes_py\wrappers\joypad_space.py", line 78, in reset
return self.env.reset()
File "D:\python\lib\site-packages\gym\wrappers\time_limit.py", line 25, in reset
return self.env.reset(**kwargs)
File "D:\python\lib\site-packages\nes_py\nes_env.py", line 258, in reset
self._restore()
File "D:\python\lib\site-packages\nes_py\nes_env.py", line 220, in _restore
_LIB.Restore(self._env)
OSError: exception: access violation reading 0x0000016262170760

Access information not stored in RAM

I was wondering if there was a way to access information that isn't stored in the RAM. In some games, information is stored outside of the RAM, but I cannot figure out how to use this emulator to access that information. Anytime I use self.ram[] to access anything greater than 0x0800, I get an error that the RAM is a numpy array of 2048 entries, related to the 2KB memory of the RAM for a NES. I want to pull information stored elsewhere (0x6000 for instance). Is there a way to do this that I am not familiar with? Thank you!
NES_env_RAM_error

env.reset() returns TypeError: JoypadSpace.reset() got an unexpected keyword argument 'seed' error while using DummyVecEnv wrapper

Describe the bug

A clear and concise description of what the bug is.
I am facing this error
TypeError: JoypadSpace.reset() got an unexpected keyword argument 'seed'
when using DummyVecEnv and env.reset() after vectorization. can anyone please help

Similar to the error here:
https://stackoverflow.com/questions/76509663/typeerror-joypadspace-reset-got-an-unexpected-keyword-argument-seed-when-i
openai/gym#2531 (comment)

To Reproduce

Steps to reproduce the behavior:
!pip install nes-py
!pip install gym-super-mario-bros
!pip install stable-baselines3[extra]
import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
from nes_py.wrappers import JoypadSpace
from gym.wrappers import GrayScaleObservation, FrameStack
from gym.wrappers import ResizeObservation
#Import Vectorization wrappers
from stable_baselines3.common.vec_env import VecFrameStack, DummyVecEnv
env = gym_super_mario_bros.make('SuperMarioBros-v0')
env = JoypadSpace(env, SIMPLE_MOVEMENT)
env = GrayScaleObservation(env, keep_dim=True)
env = DummyVecEnv([lambda: env])
env = VecFrameStack(env, 4, channels_order='last')
state = env.reset()

Expected behavior

A clear and concise description of what you expected to happen.
should return start state of mario game environment with 4 stacked frames

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: Google Colab
  • Python version: 3.10
  • C++ compiler and version:

Additional context

Add any other context about the problem here.

Read/Write Hooks

It might be beneficial to design some form of read / write hooks to fire a callback when a certain memory address is read / written to.

Failed to install version 3.0.2 on Windows

Describe the bug

Couldn't install newest version. Main error message is:

AttributeError: 'MSVCCompiler' object has no attribute 'compiler_so'

To Reproduce

Steps to reproduce the behavior:

In powershell (or other terminal, presumably):

pip install --upgrade nes-py

Expected behavior

Successful installation.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: Windows 10 x64
  • Python version: 3.6.7
  • C++ compiler and version: Don't know. I have Visual Studio 2017 (15.9.4) installed.

Additional context

PS C:\Windows\system32> pip install --upgrade nes-py gym-super-mario-bros
Collecting nes-py
Downloading https://files.pythonhosted.org/packages/fe/1b/6bffbcc167e9044bfdddb5d76b51bb76049d514d43865dc086e86f9a2c38/nes_py-3.0.2.tar.gz
Collecting gym-super-mario-bros
Downloading https://files.pythonhosted.org/packages/fb/62/f2d469d5efc3b2eb94663f1dfb66e035a342935ed400c6745e90bf34b363/gym_super_mario_bros-6.0.2-py2.py3-none-any.whl (197kB)
100% |████████████████████████████████| 204kB 1.6MB/s
Requirement already satisfied, skipping upgrade: gym>=0.10.9 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from nes-py) (0.10.9)
Requirement already satisfied, skipping upgrade: matplotlib>=2.3.2 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from nes-py) (3.0.2)
Requirement already satisfied, skipping upgrade: numpy>=1.12.1 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from nes-py) (1.15.4)
Requirement already satisfied, skipping upgrade: opencv-python>=3.4.0.12 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from nes-py) (3.4.4.19)
Requirement already satisfied, skipping upgrade: pygame>=1.9.3 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from nes-py) (1.9.4)
Requirement already satisfied, skipping upgrade: pyglet>=1.3.2 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from nes-py) (1.3.2)
Requirement already satisfied, skipping upgrade: tqdm>=4.19.5 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from nes-py) (4.28.1)
Requirement already satisfied, skipping upgrade: scipy in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from gym>=0.10.9->nes-py) (1.1.0)
Requirement already satisfied, skipping upgrade: requests>=2.0 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from gym>=0.10.9->nes-py) (2.21.0)
Requirement already satisfied, skipping upgrade: six in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from gym>=0.10.9->nes-py) (1.12.0)
Requirement already satisfied, skipping upgrade: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from matplotlib>=2.3.2->nes-py) (2.3.0)
Requirement already satisfied, skipping upgrade: cycler>=0.10 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from matplotlib>=2.3.2->nes-py) (0.10.0)
Requirement already satisfied, skipping upgrade: kiwisolver>=1.0.1 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from matplotlib>=2.3.2->nes-py) (1.0.1)
Requirement already satisfied, skipping upgrade: python-dateutil>=2.1 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from matplotlib>=2.3.2->nes-py) (2.7.5)
Requirement already satisfied, skipping upgrade: future in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from pyglet>=1.3.2->nes-py) (0.17.1)
Requirement already satisfied, skipping upgrade: idna<2.9,>=2.5 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from requests>=2.0->gym>=0.10.9->nes-py) (2.8)
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.21.1 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from requests>=2.0->gym>=0.10.9->nes-py) (1.24.1)
Requirement already satisfied, skipping upgrade: chardet<3.1.0,>=3.0.2 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from requests>=2.0->gym>=0.10.9->nes-py) (3.0.4)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from requests>=2.0->gym>=0.10.9->nes-py) (2018.11.29)
Requirement already satisfied, skipping upgrade: setuptools in c:\users\elias\appdata\local\programs\python\python36\lib\site-packages (from kiwisolver>=1.0.1->matplotlib>=2.3.2->nes-py) (40.6.3)
Building wheels for collected packages: nes-py
Running setup.py bdist_wheel for nes-py ... error
Complete output from command c:\users\elias\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d C:\Users\elias\AppData\Local\Temp\pip-wheel-hdd5qieu --python-tag cp36:
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\nes_py
copying nes_py\nes_env.py -> build\lib.win-amd64-3.6\nes_py
copying nes_py_image_viewer.py -> build\lib.win-amd64-3.6\nes_py
copying nes_py_init_.py -> build\lib.win-amd64-3.6\nes_py
creating build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\binary_to_discrete_space_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\clip_reward_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\downsample_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\frame_stack_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\normalize_reward_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\penalize_death_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\reward_cache_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers_init_.py -> build\lib.win-amd64-3.6\nes_py\wrappers
creating build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app\cli.py -> build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app\play.py -> build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app\play_human.py -> build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app_init_.py -> build\lib.win-amd64-3.6\nes_py_app
creating build\lib.win-amd64-3.6\nes_py\wrappers_util
copying nes_py\wrappers_util\lazy_frames.py -> build\lib.win-amd64-3.6\nes_py\wrappers_util
copying nes_py\wrappers_util_init_.py -> build\lib.win-amd64-3.6\nes_py\wrappers_util
creating build\lib.win-amd64-3.6\nes_py_app\visualize
copying nes_py_app\visualize\realtime_plot.py -> build\lib.win-amd64-3.6\nes_py_app\visualize
copying nes_py_app\visualize_init_.py -> build\lib.win-amd64-3.6\nes_py_app\visualize
running build_ext
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\setup.py", line 95, in
cmdclass={'build_ext': BuildExt},
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\setuptools_init_.py", line 143, in setup
return distutils.core.setup(**attrs)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\wheel\bdist_wheel.py", line 188, in run
self.run_command('build')
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\build_ext.py", line 78, in run
_build_ext.run(self)
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\setup.py", line 17, in build_extensions
self.compiler.compiler_so.remove("-Wstrict-prototypes")
AttributeError: 'MSVCCompiler' object has no attribute 'compiler_so'


Failed building wheel for nes-py
Running setup.py clean for nes-py
Failed to build nes-py
Installing collected packages: nes-py, gym-super-mario-bros
Found existing installation: nes-py 2.0.0
Uninstalling nes-py-2.0.0:
Successfully uninstalled nes-py-2.0.0
Running setup.py install for nes-py ... error
Complete output from command c:\users\elias\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\elias\AppData\Local\Temp\pip-record-4hvm2g7f\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build\lib.win-amd64-3.6
creating build\lib.win-amd64-3.6\nes_py
copying nes_py\nes_env.py -> build\lib.win-amd64-3.6\nes_py
copying nes_py_image_viewer.py -> build\lib.win-amd64-3.6\nes_py
copying nes_py_init_.py -> build\lib.win-amd64-3.6\nes_py
creating build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\binary_to_discrete_space_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\clip_reward_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\downsample_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\frame_stack_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\normalize_reward_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\penalize_death_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers\reward_cache_env.py -> build\lib.win-amd64-3.6\nes_py\wrappers
copying nes_py\wrappers_init_.py -> build\lib.win-amd64-3.6\nes_py\wrappers
creating build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app\cli.py -> build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app\play.py -> build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app\play_human.py -> build\lib.win-amd64-3.6\nes_py_app
copying nes_py_app_init_.py -> build\lib.win-amd64-3.6\nes_py_app
creating build\lib.win-amd64-3.6\nes_py\wrappers_util
copying nes_py\wrappers_util\lazy_frames.py -> build\lib.win-amd64-3.6\nes_py\wrappers_util
copying nes_py\wrappers_util_init_.py -> build\lib.win-amd64-3.6\nes_py\wrappers_util
creating build\lib.win-amd64-3.6\nes_py_app\visualize
copying nes_py_app\visualize\realtime_plot.py -> build\lib.win-amd64-3.6\nes_py_app\visualize
copying nes_py_app\visualize_init_.py -> build\lib.win-amd64-3.6\nes_py_app\visualize
running build_ext
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\setup.py", line 95, in
cmdclass={'build_ext': BuildExt},
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\setuptools_init_.py", line 143, in setup
return distutils.core.setup(**attrs)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\install.py", line 61, in run
return orig.install.run(self)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\command\install.py", line 545, in run
self.run_command('build')
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\command\build.py", line 135, in run
self.run_command(cmd_name)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\setuptools\command\build_ext.py", line 78, in run
_build_ext.run(self)
File "c:\users\elias\appdata\local\programs\python\python36\lib\site-packages\Cython\Distutils\old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "c:\users\elias\appdata\local\programs\python\python36\lib\distutils\command\build_ext.py", line 339, in run
self.build_extensions()
File "C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\setup.py", line 17, in build_extensions
self.compiler.compiler_so.remove("-Wstrict-prototypes")
AttributeError: 'MSVCCompiler' object has no attribute 'compiler_so'

----------------------------------------

Rolling back uninstall of nes-py
Command "c:\users\elias\appdata\local\programs\python\python36\python.exe -u -c "import setuptools, tokenize;file='C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\elias\AppData\Local\Temp\pip-record-4hvm2g7f\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\elias\AppData\Local\Temp\pip-install-g66d63b4\nes-py\

Clone / Restore

Is your feature request related to a problem? Please describe.

The clone / restore feature from 2.x needs restored with the SimpleNES back-end

Describe the solution you'd like

An ability to clone emulator states and restore them.

Describe alternatives you've considered

NA

Additional context

see 2.x

Mappers

The mappers in the current design cover most the popular games, but there are many others to implements for 100% support according to tuxnes:

  • MMC3
  • AOROM
  • AVE
  • Bandai
  • Camerica
  • Colour Dreams
  • FFE F3xxx
  • FFE F4xxx
  • FFE F8xxx
  • Irem G-101
  • Irem H3001
  • Irem 74161/32
  • MMC5
  • Namcot 106
  • Namco 118
  • Nina-1
  • PC-Cony
  • Rambo-1
  • SS8806
  • Sunsoft 4
  • Sunsoft 5
  • Taito X117
  • TC0190 / TC0350
  • TC190V
  • TQROM
  • Unisystem
  • VRC2b
  • VRC4
  • VRC4-2A
  • VRC4-1B
  • VRC6
  • VRC6v
  • VRC7
  • 74161/32

Graphical Glitch After backup

Describe the bug

Reseting the state causes graphics to fail.

To Reproduce

Steps to reproduce the behavior:

very hard to reproduce in the current state. The original issue provides a script to reproduce the issue.

Expected behavior

The NES emulator should function the same after many calls to reset. The game should perfectly restore to its frozen point in time.

Hold button

I am trying to figure out how the joypad wrapper handles holding a button as opposed to just repeat pressing. like if the same command is given twice does it hold or send the command twice and is there a way to tell it to hold the button down?

Pause when view hides

the emulator needs to pause when the view is unloading (like switching apps or opening control center or something of the like)

Fails to Compile on MacOS (GCC)

Describe the bug

pip install nes-py failed due to compiling error below:

Requirement already satisfied: gym>=0.10.9 in ./venv/lib/python3.6/site-packages (from nes-py==6.2.1) (0.10.9)
Requirement already satisfied: matplotlib>=2.0.2 in ./venv/lib/python3.6/site-packages (from nes-py==6.2.1) (3.0.2)
Requirement already satisfied: numpy>=1.12.1 in ./venv/lib/python3.6/site-packages (from nes-py==6.2.1) (1.16.0)
Requirement already satisfied: opencv-python>=3.4.0.12 in ./venv/lib/python3.6/site-packages (from nes-py==6.2.1) (4.0.0.21)
Requirement already satisfied: pygame>=1.9.3 in ./venv/lib/python3.6/site-packages (from nes-py==6.2.1) (1.9.4)
Requirement already satisfied: pyglet>=1.3.2 in ./venv/lib/python3.6/site-packages (from nes-py==6.2.1) (1.3.2)
Requirement already satisfied: tqdm>=4.19.5 in ./venv/lib/python3.6/site-packages (from nes-py==6.2.1) (4.30.0)
Requirement already satisfied: requests>=2.0 in ./venv/lib/python3.6/site-packages (from gym>=0.10.9->nes-py==6.2.1) (2.21.0)
Requirement already satisfied: scipy in ./venv/lib/python3.6/site-packages (from gym>=0.10.9->nes-py==6.2.1) (1.2.0)
Requirement already satisfied: six in ./venv/lib/python3.6/site-packages (from gym>=0.10.9->nes-py==6.2.1) (1.12.0)
Requirement already satisfied: python-dateutil>=2.1 in ./venv/lib/python3.6/site-packages (from matplotlib>=2.0.2->nes-py==6.2.1) (2.7.5)
Requirement already satisfied: kiwisolver>=1.0.1 in ./venv/lib/python3.6/site-packages (from matplotlib>=2.0.2->nes-py==6.2.1) (1.0.1)
Requirement already satisfied: cycler>=0.10 in ./venv/lib/python3.6/site-packages (from matplotlib>=2.0.2->nes-py==6.2.1) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./venv/lib/python3.6/site-packages (from matplotlib>=2.0.2->nes-py==6.2.1) (2.3.1)
Requirement already satisfied: future in ./venv/lib/python3.6/site-packages (from pyglet>=1.3.2->nes-py==6.2.1) (0.17.1)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./venv/lib/python3.6/site-packages (from requests>=2.0->gym>=0.10.9->nes-py==6.2.1) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in ./venv/lib/python3.6/site-packages (from requests>=2.0->gym>=0.10.9->nes-py==6.2.1) (1.24.1)
Requirement already satisfied: idna<2.9,>=2.5 in ./venv/lib/python3.6/site-packages (from requests>=2.0->gym>=0.10.9->nes-py==6.2.1) (2.8)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.6/site-packages (from requests>=2.0->gym>=0.10.9->nes-py==6.2.1) (2018.11.29)
Requirement already satisfied: setuptools in ./venv/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=2.0.2->nes-py==6.2.1) (40.7.1)
Installing collected packages: nes-py
Running setup.py develop for nes-py
Complete output from command /Users/omnidevio/Desktop/gym_mario/venv/bin/python -c "import setuptools, tokenize;file='/Users/omnidevio/Desktop/gym_mario/nes-py/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" develop --no-deps:
running develop
running egg_info
writing nes_py.egg-info/PKG-INFO
writing dependency_links to nes_py.egg-info/dependency_links.txt
writing entry points to nes_py.egg-info/entry_points.txt
writing requirements to nes_py.egg-info/requires.txt
writing top-level names to nes_py.egg-info/top_level.txt
reading manifest file 'nes_py.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'nes_py.egg-info/SOURCES.txt'
running build_ext
building 'nes_py.lib_nes_env' extension
creating build
creating build/temp.macosx-10.7-x86_64-3.6
creating build/temp.macosx-10.7-x86_64-3.6/nes_py
creating build/temp.macosx-10.7-x86_64-3.6/nes_py/nes
creating build/temp.macosx-10.7-x86_64-3.6/nes_py/nes/src
creating build/temp.macosx-10.7-x86_64-3.6/nes_py/nes/src/mappers
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/omnidevio/anaconda3/include -arch x86_64 -I/Users/omnidevio/anaconda3/include -arch x86_64 -Ines_py/nes/include -I/Users/omnidevio/anaconda3/include/python3.6m -c nes_py/nes/src/cartridge.cpp -o build/temp.macosx-10.7-x86_64-3.6/nes_py/nes/src/cartridge.o -std=c++1y -march=native -pipe -O2
nes_py/nes/src/cartridge.cpp:14:19: error: no matching constructor for initialization of 'std::ifstream' (aka 'basic_ifstream')
std::ifstream romFile (path, std::ios_base::binary | std::ios_base::in);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/4.2.1/fstream:465:7: note: candidate constructor not viable: no known conversion from 'std::string' (aka 'basic_string') to 'const char ' for 1st argument
basic_ifstream(const char
__s, ios_base::openmode __mode = ios_base::in)
^
/usr/include/c++/4.2.1/bits/fstream.tcc:894:25: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 2 were provided
extern template class basic_ifstream;
^
/usr/include/c++/4.2.1/fstream:451:7: note: candidate constructor not viable: requires 0 arguments, but 2 were provided
basic_ifstream() : __istream_type(), _M_filebuf()
^
1 error generated.
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/Users/omnidevio/Desktop/gym_mario/venv/bin/python -c "import setuptools, tokenize;file='/Users/omnidevio/Desktop/gym_mario/nes-py/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" develop --no-deps" failed with error code 1 in /Users/omnidevio/Desktop/gym_mario/nes-py/

To Reproduce

Steps to reproduce the behavior:

run pip install nes-py under Mac OS

Expected behavior

successful installation for Mac OS

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

Operating System: MacOS 10.12.6
Python version: 3.6.3

Additional context

Add any other context about the problem here.

Continuous prediction of action by agent does not result in the desired action in the Env

Describe the bug

I am running into an issue where if my agent predicts the ["right", "B"] action continuously, the environment only reacts to the "right" part and the agent character only runs right without firing his gun.

To Reproduce

With a custom environment like this,

CUSTOM_MOVEMENT = [
    ["right", "B"],
    ["right", "A", "B"],
    ["right", "B", "up"],
    ["right", "A", "B", "up"],
    ["left"],
    ["down", "B"],
    ["down", "A", "B"],
    ["up", "B"],
]

the agent predicts index 0 as the action but when I try playing the action the agent only runs right and ignores the B part to fire his gun.

Save and Restore State

It would be useful to define functionality to save and restore states (to memory) for setting up environments only once. Opposed to setting them up on each reset or something.

ImportError when using nes_py.wrappers/JoypadSpace

Describe the bug

ImportError: cannot import name 'Env' when using JoypadSpace.

To Reproduce

Steps to reproduce the behavior:
Code from gym_super_mario_bros pypi documentation :

from nes_py.wrappers import JoypadSpace
import gym_super_mario_bros
from gym_super_mario_bros.actions import SIMPLE_MOVEMENT
env = gym_super_mario_bros.make('SuperMarioBros-v0')
env = JoypadSpace(env, SIMPLE_MOVEMENT)

done = True
for step in range(5000):
    if done:
        state = env.reset()
    state, reward, done, info = env.step(env.action_space.sample())
    env.render()

env.close()

Expected behavior

Start a new gym environment using nes_py and render a few games on-screen.

Environment

  • Operating System: Ubuntu 18.04.2 LTS
  • Python version: Python 3.6.9
  • C++ compiler and version: gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)

Additional context

Full stacktrace:

  File "{...}/Desktop/openai-gym/gym.py", line 1, in <module>
    from nes_py.wrappers import JoypadSpace
  File "{...}/venv/lib/python3.6/site-packages/nes_py/__init__.py", line 2, in <module>
    from .nes_env import NESEnv
  File "{...}/venv/lib/python3.6/site-packages/nes_py/nes_env.py", line 7, in <module>
    import gym
  File "{...}/openai-gym/gym.py", line 1, in <module>
    from nes_py.wrappers import JoypadSpace
  File "{...}/venv/lib/python3.6/site-packages/nes_py/wrappers/__init__.py", line 2, in <module>
    from .joypad_space import JoypadSpace
  File "{...}/venv/lib/python3.6/site-packages/nes_py/wrappers/joypad_space.py", line 3, in <module>
    from gym import Env
ImportError: cannot import name 'Env'

'def _will_reset(self)' description is wrong in the wiki

In the wiki under Creating Envionemts - Boilerplate the following function is described:

def _will_reset(self):
"""Handle any RAM hacking after a reset occurs."""
# use this method to perform setup before and episode resets.
# the method returns None
pass

If im correct, the description should be """Handle any RAM hacking before a reset occurs."""

Undefined symbol "_ZTVSt9basic_iosIcSt11char_traitsIcEE"

Describe the bug

Traceback (most recent call last):
  File "/usr/home/ManPython/venvpython311/bin/nes_py", line 5, in <module>
    from nes_py.app.cli import main
  File "/usr/home/ManPython/venvpython311/lib/python3.11/site-packages/nes_py/__init__.py", line 2, in <module>
    from .nes_env import NESEnv
  File "/usr/home/ManPython/venvpython311/lib/python3.11/site-packages/nes_py/nes_env.py", line 23, in <module>
    _LIB = ctypes.cdll.LoadLibrary(glob.glob(_LIB_PATH)[0])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ctypes/__init__.py", line 454, in LoadLibrary
    return self._dlltype(name)
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/ctypes/__init__.py", line 376, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /usr/home/ManPython/venvpython311/lib/python3.11/site-packages/nes_py/lib_nes_env.cpython-311.so: Undefined symbol "_ZTVSt9basic_iosIcSt11char_traitsIcEE"

To Reproduce

Steps to reproduce the behavior:

  1. nes_py -r E:\roms\1.nes

Expected behavior

Run simple mario game.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: W11
  • Python version: 311
  • C++ compiler and version:
    C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x86
    C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64

Additional context

nes_py-8.2.1.tar.gz

I cannot reproduce results for an agent. What is going on?

Describe the bug

I have a trained agent which passes a Mario level when I run one script. After that I try to repeat the run on another script but it does not manage to finish the level.

Expected behavior

I expect a deterministic agent getting the same result in a deterministic environment.

Environment

  • Operating System: Ubuntu
  • Python version: 3.8

Additional context

It may be that I need to fix some randomness, but it is not clear how env.seed(1) according to help is fixing the level sequence only.

Fails to Compile on Windows 10 (Visual Studio 2017)

Describe the bug

pip install nes-py failed due to compiling error below:

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ines_py/nes/include -IC:\ProgramData\Anaconda3\envs\tfgpu_env\include -IC:\ProgramData\Anaconda3\envs\tfgpu_env\include "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\ATLMFC\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.16.27023\include" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.17763.0\cppwinrt" /EHsc /Tpnes_py/nes/src\cpu.cpp /Fobuild\temp.win-amd64-3.6\Release\nes_py/nes/src\cpu.obj -std=c++1y -march=native -pipe -O2
cl : Command line warning D9002 : ignoring unknown option '-std=c++1y'
cl : Command line warning D9002 : ignoring unknown option '-march=native'
cl : Command line warning D9002 : ignoring unknown option '-pipe'
cpu.cpp
nes_py/nes/src\cpu.cpp(154): error C2196: case value '3' already used

To Reproduce

Steps to reproduce the behavior:

run pip install nes-py under windows 10

Expected behavior

successful installation for windows 10

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

  • Operating System: Windows 10
  • Python version: 3.6.8
  • C++ compiler and version: Visual Studio 2017

Additional context

Add any other context about the problem here.

Pyglet fails to render from multiple threads

Describe the bug

Calling render from a new thread after first calling it from another results in an error (see console output below). This may well be a limitation of Pyglet, but I don't know. Note that running the environments without rendering to screen works as expected, but for some purposes (debugging of graphical glitches etc.) it can be very useful to monitor multiple environments at the same time, even if they are in different threads.

If Pyglet is the problem, maybe one of the alternatives works better?

To Reproduce

import threading
import gym_super_mario_bros
from gym_super_mario_bros.actions import COMPLEX_MOVEMENT
from nes_py.wrappers import JoypadSpace

RENDER = True
THREADS = 2

def testEnv(thread_index):
	env = gym_super_mario_bros.make('SuperMarioBros-v0')
	env = JoypadSpace(env, COMPLEX_MOVEMENT)
	done = True
	for i in range(5000):
		if done:
			env.reset()
		obs,rew,done,info = env.step(env.action_space.sample())
		if RENDER:
			env.render()
	return True

threads = [None]*THREADS
for i in range(THREADS):
	t = threading.Thread(target=testEnv,args=(i,))
	threads[i] = t
	t.start()
for t in threads:
	t.join()

Expected behavior

Rendering in independent windows.

Environment

  • Operating System: Windows 10 x64
  • Python version: 3.6.7
  • C++ compiler and version: Visual Studio 2017

Additional context

Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
self._target(*self.args, **self.kwargs)
File "c:\users\elias\dropbox (personal)\phd\projects\smb\smb_sample_frames.py", line 120, in env_worker
env.render()
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\gym\core.py", line 275, in render
return self.env.render(mode, **kwargs)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\gym\core.py", line 275, in render
return self.env.render(mode, **kwargs)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\nes_py\nes_env.py", line 335, in render
self.viewer.show(self.screen)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\nes_py_image_viewer.py", line 65, in show
self.open()
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\nes_py_image_viewer.py", line 47, in open
resizable=True,
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\window\win32_init
.py", line 134, in init
super(Win32Window, self).init(*args, **kwargs)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\window_init
.py", line 512, in init
config = screen.get_best_config(template_config)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\canvas\base.py", line 159, in get_best_config
configs = self.get_matching_configs(template)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\canvas\win32.py", line 34, in get_matching_configs
configs = template.match(canvas)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\gl\win32.py", line 27, in match
return self._get_arb_pixel_format_matching_configs(canvas)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\gl\win32.py", line 100, in _get_arb_pixel_format_matching_configs
nformats, pformats, nformats)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\gl\lib_wgl.py", line 106, in call
return self.func(*args, **kwargs)
File "C:\Users\elias\AppData\Local\Programs\Python\Python36\lib\site-packages\pyglet\gl\lib.py", line 63, in MissingFunction
raise MissingFunctionException(name, requires, suggestions)
pyglet.gl.lib.MissingFunctionException: wglChoosePixelFormatARB is not exported by the available OpenGL driver. ARB_pixel_format is required for this functionality.

pyglet 1.4.7 issue?

On Win 10 x64 + Python 3.7.5, running nes_py -h produces this:

Traceback (most recent call last):
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pyglet 1.4.7 (c:\python37\lib\site-packages), Requirement.parse('pyglet<=1.3.2,>=1.2.0'), {'gym'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Python37\Scripts\nes_py-script.py", line 6, in <module>
    from pkg_resources import load_entry_point
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 3250, in <module>
    @_call_aside
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 585, in _build_master
    return cls._build_from_requirements(__requires__)
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 598, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "c:\python37\lib\site-packages\pkg_resources\__init__.py", line 791, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pyglet 1.4.7 (c:\python37\lib\site-packages), Requirement.parse('pyglet<=1.3.2,>=1.2.0'), {'gym'})

Can't install on macOS 12.5

Describe the bug

I get the bellow error when trying to install nes-py.

To Reproduce

pip install nes-py

Expected behavior

Ideally it should install nes-py

Screenshots

Environment

  • Operating System:macOS 12.5
  • Python version: 3.9.13
  • C++ compiler and version: Apple clang version 13.0.0 (clang-1300.0.29.30)

Additional context

`g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Ines_py/nes/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c nes_py/nes/src/cartridge.cpp -o build/temp.macosx-10.9-universal2-cpython-310/nes_py/nes/src/cartridge.o -std=c++1y -pipe -O3
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:1582:12: error: reference to unresolved using declaration
static time_t to_time_t (const time_point& __t) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:1583:35: error: reference to unresolved using declaration
static time_point from_time_t(time_t __t) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:2950:10: error: reference to unresolved using declaration
static time_t to_time_t(const time_point& __t) noexcept {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:2957:33: error: reference to unresolved using declaration
static time_point from_time_t(time_t __t) noexcept {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:2952:14: error: reference to unresolved using declaration
return time_t(
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:334:28: error: incomplete result type '__libcpp_timespec_t' (aka 'timespec') in function definition
inline __libcpp_timespec_t __convert_to_timespec(const chrono::nanoseconds& __ns)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:307:16: note: forward declaration of 'timespec'
const struct timespec * _Nullable __restrict)
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:338:23: error: variable has incomplete type '__libcpp_timespec_t' (aka 'timespec')
__libcpp_timespec_t __ts;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:307:16: note: forward declaration of 'timespec'
const struct timespec * _Nullable __restrict)
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:545:24: error: variable has incomplete type '__libcpp_timespec_t' (aka 'timespec')
__libcpp_timespec_t __ts = __thread_detail::__convert_to_timespec(__ns);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:307:16: note: forward declaration of 'timespec'
const struct timespec * _Nullable __restrict)
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2232:27: error: member access into incomplete type 'tm'
__get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2244:25: error: member access into incomplete type 'tm'
__get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2256:20: error: member access into incomplete type 'tm'
__get_year(__tm->tm_year, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2273:31: error: member access into incomplete type 'tm'
__get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2278:29: error: member access into incomplete type 'tm'
__get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2288:23: error: member access into incomplete type 'tm'
__get_day(__tm->tm_mday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2303:24: error: member access into incomplete type 'tm'
__get_hour(__tm->tm_hour, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2306:27: error: member access into incomplete type 'tm'
__get_12_hour(__tm->tm_hour, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2309:32: error: member access into incomplete type 'tm'
__get_day_year_num(__tm->tm_yday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2312:25: error: member access into incomplete type 'tm'
__get_month(__tm->tm_mon, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2315:26: error: member access into incomplete type 'tm'
__get_minute(__tm->tm_min, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/g++' failed with exit code 1
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for nes_py
Running setup.py clean for nes_py
Failed to build nes_py
Installing collected packages: nes_py, gym_super_mario_bros
Running setup.py install for nes_py ... error
error: subprocess-exited-with-error

× Running setup.py install for nes_py did not run successfully.
│ exit code: 1
╰─> [286 lines of output]
running install
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-310
creating build/lib.macosx-10.9-universal2-cpython-310/nes_py
copying nes_py/nes_env.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py
copying nes_py/init.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py
copying nes_py/_image_viewer.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py
copying nes_py/_rom.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py
creating build/lib.macosx-10.9-universal2-cpython-310/nes_py/wrappers
copying nes_py/wrappers/joypad_space.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py/wrappers
copying nes_py/wrappers/init.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py/wrappers
creating build/lib.macosx-10.9-universal2-cpython-310/nes_py/app
copying nes_py/app/init.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py/app
copying nes_py/app/play_random.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py/app
copying nes_py/app/cli.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py/app
copying nes_py/app/play_human.py -> build/lib.macosx-10.9-universal2-cpython-310/nes_py/app
running build_ext
building 'nes_py.lib_nes_env' extension
creating build/temp.macosx-10.9-universal2-cpython-310
creating build/temp.macosx-10.9-universal2-cpython-310/nes_py
creating build/temp.macosx-10.9-universal2-cpython-310/nes_py/nes
creating build/temp.macosx-10.9-universal2-cpython-310/nes_py/nes/src
creating build/temp.macosx-10.9-universal2-cpython-310/nes_py/nes/src/mappers
g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -Ines_py/nes/include -I/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c nes_py/nes/src/cartridge.cpp -o build/temp.macosx-10.9-universal2-cpython-310/nes_py/nes/src/cartridge.o -std=c++1y -pipe -O3
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:1582:12: error: reference to unresolved using declaration
static time_t to_time_t (const time_point& __t) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:1583:35: error: reference to unresolved using declaration
static time_point from_time_t(time_t __t) _NOEXCEPT;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:2950:10: error: reference to unresolved using declaration
static time_t to_time_t(const time_point& __t) noexcept {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:2957:33: error: reference to unresolved using declaration
static time_point from_time_t(time_t __t) noexcept {
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:15:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/chrono:2952:14: error: reference to unresolved using declaration
return time_t(
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ctime:75:1: note: using declaration annotated with 'using_if_exists' here
_LIBCPP_USING_IF_EXISTS(::time_t);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:232:39: note: expanded from macro '_LIBCPP_USING_IF_EXISTS'
# define _LIBCPP_USING_IF_EXISTS(...) using VA_ARGS attribute((using_if_exists))
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:334:28: error: incomplete result type '__libcpp_timespec_t' (aka 'timespec') in function definition
inline __libcpp_timespec_t __convert_to_timespec(const chrono::nanoseconds& __ns)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:307:16: note: forward declaration of 'timespec'
const struct timespec * _Nullable __restrict)
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:338:23: error: variable has incomplete type '__libcpp_timespec_t' (aka 'timespec')
__libcpp_timespec_t __ts;
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:307:16: note: forward declaration of 'timespec'
const struct timespec * _Nullable __restrict)
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:137:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ios:215:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:15:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string:511:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/string_view:179:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__string:57:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:653:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:687:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/atomic:579:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__threading_support:545:24: error: variable has incomplete type '__libcpp_timespec_t' (aka 'timespec')
__libcpp_timespec_t __ts = __thread_detail::__convert_to_timespec(__ns);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/pthread.h:307:16: note: forward declaration of 'timespec'
const struct timespec * _Nullable __restrict)
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2232:27: error: member access into incomplete type 'tm'
__get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2244:25: error: member access into incomplete type 'tm'
__get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2256:20: error: member access into incomplete type 'tm'
__get_year(__tm->tm_year, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2273:31: error: member access into incomplete type 'tm'
__get_weekdayname(__tm->tm_wday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2278:29: error: member access into incomplete type 'tm'
__get_monthname(__tm->tm_mon, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2288:23: error: member access into incomplete type 'tm'
__get_day(__tm->tm_mday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2303:24: error: member access into incomplete type 'tm'
__get_hour(__tm->tm_hour, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2306:27: error: member access into incomplete type 'tm'
__get_12_hour(__tm->tm_hour, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2309:32: error: member access into incomplete type 'tm'
__get_day_year_num(__tm->tm_yday, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2312:25: error: member access into incomplete type 'tm'
__get_month(__tm->tm_mon, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
In file included from nes_py/nes/src/cartridge.cpp:8:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/fstream:184:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:139:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2315:26: error: member access into incomplete type 'tm'
__get_minute(__tm->tm_min, __b, __e, __err, __ct);
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/wchar.h:131:19: note: forward declaration of 'tm'
const struct tm * __restrict) __DARWIN_ALIAS(wcsftime);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
error: command '/usr/bin/g++' failed with exit code 1
[end of output]

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

× Encountered error while trying to install package.
╰─> nes_py`

ValueError: ROM header zero fill bytes are not zero.

I want to load a new rom by nes_py, but it raise this error.

ValueError: ROM header zero fill bytes are not zero.

And I find it's from a few lines code:

 def _zero_fill(self):
        """Return the zero fill bytes at the end of the header."""
        return self.header[11:].sum()

Will there be any side effects if I just modify the source code to bypass this limitation ?

THANKS !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.