Baekalfen / PyBoy

Game Boy emulator written in Python
Other
4.57k stars 472 forks source link

Windows/macOS: Missing wheels on PyPI #321

Closed Prathmesh-puranik closed 4 months ago

Prathmesh-puranik commented 5 months ago

pip install pyboy Collecting pyboy Using cached pyboy-2.0.1.tar.gz (60 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [128 lines of output] running egg_info writing pyboy.egg-info\PKG-INFO writing dependency_links to pyboy.egg-info\dependency_links.txt writing entry points to pyboy.egg-info\entry_points.txt writing requirements to pyboy.egg-info\requires.txt writing top-level names to pyboy.egg-info\top_level.txt warning: pyboy\api\memory_scanner.pxd:10:26: noexcept clause is ignored for function returning Python object warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy__init.cython-30.pxd:245:34: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy__init.cython-30.pxd:257:28: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy__init.cython-30.pxd:263:35: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy__init.cython-30.pxd:271:37: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy__init.cython-30.pxd:278:33: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy__init__.cython-30.pxd:284:30: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy__init__.cython-30.pxd:968:31: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy\init__.cython-30.pxd:999:38: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy\init__.cython-30.pxd:1014:37: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy\init__.cython-30.pxd:1029:45: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy\init__.cython-30.pxd:1039:47: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\numpy\init__.cython-30.pxd:1046:48: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword. warning: .\pyboy\core\cartridge\base_mbc.pxd:38:24: noexcept clause is ignored for function returning Python object

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
  from libc.stdint cimport int16_t, uint8_t, uint16_t, uint32_t, uint64_t

  cimport pyboy.core.mb
  from pyboy.utils cimport IntIOInterface

  from . cimport opcodes
  ^
  ------------------------------------------------------------

  .\pyboy\core\cpu.pxd:12:0: 'pyboy\core.pxd' not found
  warning: .\pyboy\core\cpu.pxd:56:19: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\core\lcd.pxd:111:32: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword.
  warning: pyboy\api\screen.pxd:14:55: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword.
  warning: .\pyboy\plugins\base_plugin.pxd:27:27: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\base_plugin.pxd:29:25: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\base_plugin.pxd:58:59: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\base_plugin.pxd:63:53: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\base_plugin.pxd:67:33: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\window_sdl2.pxd:23:26: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\debug.pxd:69:27: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\debug.pxd:88:27: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\debug.pxd:100:27: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\debug.pxd:108:27: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\debug_prompt.pxd:14:31: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword.
  warning: .\pyboy\plugins\game_wrapper_super_mario_land.pxd:27:24: noexcept clause is ignored for function returning Python object
  warning: .\pyboy\plugins\game_wrapper_tetris.pxd:23:28: noexcept clause is ignored for function returning Python object
  warning: pyboy\plugins\manager.pxd:66:27: noexcept clause is ignored for function returning Python object
  warning: pyboy\plugins\manager.pxd:70:25: noexcept clause is ignored for function returning Python object
  warning: pyboy\pyboy.pxd:28:34: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword.
  warning: pyboy\pyboy.pxd:85:28: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword.
  warning: pyboy\pyboy.pxd:89:28: Implicit noexcept declaration is deprecated. Function declaration should contain 'noexcept' keyword.
  warning: pyboy\pyboy.pxd:92:27: noexcept clause is ignored for function returning Python object
  warning: pyboy\pyboy.pxd:93:44: noexcept clause is ignored for function returning Python object
  warning: pyboy\pyboy.pxd:94:25: noexcept clause is ignored for function returning Python object
  warning: pyboy\pyboy.py:147:98: the result of using negative indices inside of code sections marked as 'wraparound=False' is undefined
  Compiling pyboy\pyboy.py because it changed.
  Compiling pyboy\utils.py because it changed.
  Compiling pyboy\__init__.py because it changed.
  Compiling pyboy\logging\logging.pyx because it changed.
  [1/4] Cythonizing pyboy\__init__.py
  [2/4] Cythonizing pyboy\logging\logging.pyx
  [3/4] Cythonizing pyboy\pyboy.py
  Traceback (most recent call last):
    File "C:\Users\puran\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "C:\Users\puran\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main    
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 105, in <module>
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\__init__.py", line 104, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
      dist.run_commands()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\dist.py", line 967, in run_command
      super().run_command(command)
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
      cmd_obj.run()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 321, in run
      self.find_sources()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 329, in find_sources
      mm.run()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 550, in run
      self.add_defaults()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\command\egg_info.py", line 588, in add_defaults
      sdist.add_defaults(self)
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\command\sdist.py", line 102, in add_defaults
      super().add_defaults()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 251, in add_defaults  
      self._add_defaults_ext()
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\command\sdist.py", line 335, in _add_defaults_ext
      build_ext = self.get_finalized_command('build_ext')
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 304, in get_finalized_command   
      cmd_obj = self.distribution.get_command_obj(command, create)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 861, in get_command_obj        
      cmd_obj = self.command_obj[command] = klass(self)
                                            ^^^^^^^^^^^
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\__init__.py", line 179, in __init__
      super().__init__(dist)
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 66, in __init__
      self.initialize_options()
    File "<string>", line 69, in initialize_options
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "C:\Users\puran\AppData\Local\Temp\pip-build-env-k_hgj5xj\overlay\Lib\site-packages\Cython\Build\Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: pyboy\pyboy.py
  [end of output]

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

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

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

Baekalfen commented 5 months ago

Thank you for posting! This is a known issue, but we are sadly unable to deploy a fix atm.

You can try this instead: pip install pyboy==2.0.0 pillow cython<=3.0.9

Deployment is related to this issue on PyPI: https://github.com/pypi/support/issues/3757

Prathmesh-puranik commented 5 months ago

Issue was solved, So I closed the issue.

On Tue, 9 Apr, 2024, 12:55 pm Mads Ynddal, @.***> wrote:

Reopened #321 https://github.com/Baekalfen/PyBoy/issues/321.

— Reply to this email directly, view it on GitHub https://github.com/Baekalfen/PyBoy/issues/321#event-12402335359, or unsubscribe https://github.com/notifications/unsubscribe-auth/BHVUUPKJ7RWITUUW7C3QOX3Y4OJW5AVCNFSM6AAAAABF43PMV2VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGQYDEMZTGUZTKOI . You are receiving this because you modified the open/close state.Message ID: @.***>

Baekalfen commented 5 months ago

We have a work-around, but the issue still persist. I'll keep it open until it fixed

Baekalfen commented 4 months ago

Issue was solved, So I closed the issue.

Could I get you to try the newest version? Just do pip install pyboy

zachwarner commented 4 months ago

FWIW I'm seeing the same on MacOS w/ python3.10.

bpugnaire commented 4 months ago

Same here on a M2 pro, python 3.10 and MacOS Ventura. I can provide the full error trace if necessary.

Baekalfen commented 4 months ago

@zachwarner @bpugnaire Thanks for reporting. I can see that prior to 3.11, we are not building Universal2 binaries for macOS. I'll see if there's any way to fix this. But for now, your best option is to upgrade Python to 3.11 or later.

bpugnaire commented 4 months ago

@Baekalfen thank for the suggestion, the bump to 3.11 indeed fixes the issue

Baekalfen commented 4 months ago

@bpugnaire Could you try with Python 3.10 again? I've deployed a fix for it now, so it should build locally

bpugnaire commented 4 months ago

@Baekalfen I confirm that it seems to work fine on a python3.10 env

Baekalfen commented 4 months ago

@Baekalfen I confirm that it seems to work fine on a python3.10 env

Awesome! Then we can close the issue