src/gevent/libev/corecext.pyx:60:26: undeclared name not builtin: long

#48
by MorphzZ - opened

anyone get this:

$ pip install -r requirements.txt
Collecting git+https://github.com/facebookresearch/seamless_communication.git (from -r requirements.txt (line 2))
  Cloning https://github.com/facebookresearch/seamless_communication.git to /tmp/pip-req-build-0yzdh3ri
  Running command git clone --filter=blob:none --quiet https://github.com/facebookresearch/seamless_communication.git /tmp/pip-req-build-0yzdh3ri
  Resolved https://github.com/facebookresearch/seamless_communication.git to commit 90e2b57ac4d82fa2bfaa25caeffe39ceb8b2ebec
  Running command git submodule update --init --recursive -q
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting Flask==2.1.3 (from -r requirements.txt (line 4))
  Downloading Flask-2.1.3-py3-none-any.whl.metadata (3.9 kB)
Collecting Flask_Sockets==0.2.1 (from -r requirements.txt (line 5))
  Downloading Flask_Sockets-0.2.1-py2.py3-none-any.whl.metadata (762 bytes)
Collecting g2p_en==2.1.0 (from -r requirements.txt (line 6))
  Downloading g2p_en-2.1.0-py3-none-any.whl.metadata (4.5 kB)
Collecting gevent==22.10.2 (from -r requirements.txt (line 7))
  Downloading gevent-22.10.2.tar.gz (6.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.6/6.6 MB 19.6 MB/s eta 0:00:00
  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
  ╰─> [47 lines of output]
      Compiling src/gevent/resolver/cares.pyx because it changed.
      [1/1] Cythonizing src/gevent/resolver/cares.pyx
      performance hint: src/gevent/libev/corecext.pyx:1339:0: Exception check on '_syserr_cb' will always require the GIL to be acquired.
      Possible solutions:
          1. Declare '_syserr_cb' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
          2. Use an 'int' return type on '_syserr_cb' to allow an error code to be returned.

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      cdef tuple integer_types

      if sys.version_info[0] >= 3:
          integer_types = int,
      else:
          integer_types = (int, long)
                                ^
      ------------------------------------------------------------

      src/gevent/libev/corecext.pyx:60:26: undeclared name not builtin: long
      Compiling src/gevent/libev/corecext.pyx because it changed.
      [1/1] Cythonizing src/gevent/libev/corecext.pyx
      Traceback (most recent call last):
        File "/home/ubuntu/seamless-streaming/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/ubuntu/seamless-streaming/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/ubuntu/seamless-streaming/venv/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rp9hjc39/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-rp9hjc39/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-rp9hjc39/overlay/lib/python3.12/site-packages/setuptools/build_meta.py", line 320, in run_setup
          exec(code, locals())
        File "<string>", line 61, in <module>
        File "/tmp/pip-install-ma1oenq0/gevent_77ea696e779f474891c73dd714ac341b/_setuputils.py", line 237, in cythonize1
          new_ext = cythonize(
                    ^^^^^^^^^^
        File "/tmp/pip-build-env-rp9hjc39/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1109, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-rp9hjc39/overlay/lib/python3.12/site-packages/Cython/Build/Dependencies.py", line 1256, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: src/gevent/libev/corecext.pyx
      [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.

Sign up or log in to comment