提问人:Mona Jalal 提问时间:11/17/2023 最后编辑:Rabbid76Mona Jalal 更新时间:11/17/2023 访问量:13
在 Ubuntu 中安装 cyglfw3 22.04
installing cyglfw3 in Ubuntu 22.04
问:
如何在 Ubuntu 22.04 中从源代码或 pip 安装此软件包?
(clean-pvnet) mona@ada:~/clean-pvnet/cyglfw3$ python3 setup.py build_ext -i
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.2
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/usr/lib/python3/dist-packages/pythran/tables.py:4520: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
if not hasattr(numpy, method):
/usr/lib/python3/dist-packages/pythran/tables.py:4553: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
obj = getattr(themodule, elem)
Compiling cyglfw3/glfw3.pyx because it changed.
[1/1] Cythonizing cyglfw3/glfw3.pyx
/home/mona/.local/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/mona/clean-pvnet/cyglfw3/cyglfw3/glfw3.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
performance hint: cyglfw3/glfw3.pyx:618:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:618:31: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:619:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:619:31: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:620:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:620:31: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:621:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:621:31: Index should be typed for more efficient access
Error compiling Cython file:
------------------------------------------------------------
...
return cglfw3.glfwGetVersionString()
def SetErrorCallback(cbfun):
global _error_fun
_error_fun = cbfun
cglfw3.glfwSetErrorCallback(errorfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:691:32: Cannot assign type 'void (int, const char *) except *' to 'GLFWerrorfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (int, const char *) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
return cglfw3.glfwGetMonitorName(<cglfw3.GLFWmonitor*>monitor._this_ptr)
def SetMonitorCallback(cbfun):
global _monitorfun
_monitorfun = cbfun
cglfw3.glfwSetMonitorCallback(monitorfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:727:34: Cannot assign type 'void (GLFWmonitor *, int) except *' to 'GLFWmonitorfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWmonitor *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
# pass
def SetWindowPosCallback(Window window, cbfun):
global _windowposfuns
_windowposfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowPosCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowposfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:841:74: Cannot assign type 'void (GLFWwindow *, int, int) except *' to 'GLFWwindowposfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowPosCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowposfun_cb)
def SetWindowSizeCallback(Window window, cbfun):
global _windowsizefuns
_windowsizefuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowSizeCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowsizefun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:846:75: Cannot assign type 'void (GLFWwindow *, int, int) except *' to 'GLFWwindowsizefun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowSizeCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowsizefun_cb)
def SetWindowCloseCallback(Window window, cbfun):
global _windowclosefuns
_windowclosefuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowCloseCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowclosefun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:851:76: Cannot assign type 'void (GLFWwindow *) except *' to 'GLFWwindowclosefun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowCloseCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowclosefun_cb)
def SetWindowRefreshCallback(Window window, cbfun):
global _windowrefreshfuns
_windowrefreshfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowRefreshCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowrefreshfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:856:78: Cannot assign type 'void (GLFWwindow *) except *' to 'GLFWwindowrefreshfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowRefreshCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowrefreshfun_cb)
def SetWindowFocusCallback(Window window, cbfun):
global _windowfocusfuns
_windowfocusfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowFocusCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowfocusfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:861:76: Cannot assign type 'void (GLFWwindow *, int) except *' to 'GLFWwindowfocusfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowFocusCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowfocusfun_cb)
def SetWindowIconifyCallback(Window window, cbfun):
global _windowiconifyfuns
_windowiconifyfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowIconifyCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowiconifyfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:866:78: Cannot assign type 'void (GLFWwindow *, int) except *' to 'GLFWwindowiconifyfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowIconifyCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowiconifyfun_cb)
def SetFramebufferSizeCallback(Window window, cbfun):
global _framebuffersize
_framebuffersizefuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetFramebufferSizeCallback(<cglfw3.GLFWwindow*>window._this_ptr, framebuffersizefun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:871:80: Cannot assign type 'void (GLFWwindow *, int, int) except *' to 'GLFWframebuffersizefun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCursor(<cglfw3.GLFWwindow*>window._this_ptr, <cglfw3.GLFWcursor*>cursor._this_ptr)
def SetKeyCallback(Window window, cbfun):
global _keyfuns
_keyfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetKeyCallback(<cglfw3.GLFWwindow*>window._this_ptr, keyfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:925:68: Cannot assign type 'void (GLFWwindow *, int, int, int, int) except *' to 'GLFWkeyfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, int, int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetKeyCallback(<cglfw3.GLFWwindow*>window._this_ptr, keyfun_cb)
def SetCharCallback(Window window, cbfun):
global _charfuns
_charfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetCharCallback(<cglfw3.GLFWwindow*>window._this_ptr, charfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:930:69: Cannot assign type 'void (GLFWwindow *, unsigned int) except *' to 'GLFWcharfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, unsigned int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCharCallback(<cglfw3.GLFWwindow*>window._this_ptr, charfun_cb)
def SetCharModsCallback(Window window, cbfun):
global _charmodsfuns
_charmodsfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetCharModsCallback(<cglfw3.GLFWwindow*>window._this_ptr, charmodsfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:935:73: Cannot assign type 'void (GLFWwindow *, unsigned int, int) except *' to 'GLFWcharmodsfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, unsigned int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCharModsCallback(<cglfw3.GLFWwindow*>window._this_ptr, charmodsfun_cb)
def SetMouseButtonCallback(Window window, cbfun):
global _mousebuttonfuns
_mousebuttonfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetMouseButtonCallback(<cglfw3.GLFWwindow*>window._this_ptr, mousebuttonfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:940:76: Cannot assign type 'void (GLFWwindow *, int, int, int) except *' to 'GLFWmousebuttonfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetMouseButtonCallback(<cglfw3.GLFWwindow*>window._this_ptr, mousebuttonfun_cb)
def SetCursorPosCallback(Window window, cbfun):
global _cursorposfuns
_cursorposfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetCursorPosCallback(<cglfw3.GLFWwindow*>window._this_ptr, cursorposfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:945:74: Cannot assign type 'void (GLFWwindow *, double, double) except *' to 'GLFWcursorposfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, double, double) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCursorPosCallback(<cglfw3.GLFWwindow*>window._this_ptr, cursorposfun_cb)
def SetCursorEnterCallback(Window window, cbfun):
global _cursorenterfuns
_cursorenterfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetCursorEnterCallback(<cglfw3.GLFWwindow*>window._this_ptr, cursorenterfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:950:76: Cannot assign type 'void (GLFWwindow *, int) except *' to 'GLFWcursorenterfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCursorEnterCallback(<cglfw3.GLFWwindow*>window._this_ptr, cursorenterfun_cb)
def SetScrollCallback(Window window, cbfun):
global _scrollfuns
_scrollfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetScrollCallback(<cglfw3.GLFWwindow*>window._this_ptr, scrollfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:955:71: Cannot assign type 'void (GLFWwindow *, double, double) except *' to 'GLFWscrollfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, double, double) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetScrollCallback(<cglfw3.GLFWwindow*>window._this_ptr, scrollfun_cb)
def SetDropCallback(Window window, cbfun):
global _dropfuns
_dropfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetDropCallback(<cglfw3.GLFWwindow*>window._this_ptr, dropfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:960:69: Cannot assign type 'void (GLFWwindow *, int, const char **) except *' to 'GLFWdropfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, const char **) except *'.
Traceback (most recent call last):
File "/home/mona/clean-pvnet/cyglfw3/setup.py", line 52, in <module>
ext_modules = cythonize(ext_modules)
File "/home/mona/.local/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/mona/.local/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: cyglfw3/glfw3.pyx
并使用 pip:
(clean-pvnet) mona@ada:~/clean-pvnet$ pip install --upgrade pip setuptools
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in /usr/lib/python3/dist-packages (22.0.2)
Collecting pip
Downloading pip-23.3.1-py3-none-any.whl (2.1 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 16.1 MB/s eta 0:00:00
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (59.6.0)
Collecting setuptools
Using cached setuptools-68.2.2-py3-none-any.whl (807 kB)
Installing collected packages: setuptools, pip
Successfully installed pip-23.3.1 setuptools-68.2.2
(clean-pvnet) mona@ada:~/clean-pvnet$ pip install cyglfw3
Defaulting to user installation because normal site-packages is not writeable
Collecting cyglfw3
Downloading cyglfw3-3.1.0.2.tar.gz (159 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 159.3/159.3 kB 4.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [266 lines of output]
/usr/lib/python3/dist-packages/scipy/__init__.py:146: UserWarning: A NumPy version >=1.17.3 and <1.25.0 is required for this version of SciPy (detected version 1.26.2
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
/usr/lib/python3/dist-packages/pythran/tables.py:4520: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
if not hasattr(numpy, method):
/usr/lib/python3/dist-packages/pythran/tables.py:4553: FutureWarning: In the future `np.bytes` will be defined as the corresponding NumPy scalar.
obj = getattr(themodule, elem)
/home/mona/.local/lib/python3.10/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /tmp/pip-install-5nkj3v3h/cyglfw3_e60397ffd8ec498985342e3fdd146f55/cyglfw3/glfw3.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
performance hint: cyglfw3/glfw3.pyx:618:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:618:31: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:619:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:619:31: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:620:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:620:31: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:621:29: Index should be typed for more efficient access
performance hint: cyglfw3/glfw3.pyx:621:31: Index should be typed for more efficient access
Error compiling Cython file:
------------------------------------------------------------
...
return cglfw3.glfwGetVersionString()
def SetErrorCallback(cbfun):
global _error_fun
_error_fun = cbfun
cglfw3.glfwSetErrorCallback(errorfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:691:32: Cannot assign type 'void (int, const char *) except *' to 'GLFWerrorfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (int, const char *) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
return cglfw3.glfwGetMonitorName(<cglfw3.GLFWmonitor*>monitor._this_ptr)
def SetMonitorCallback(cbfun):
global _monitorfun
_monitorfun = cbfun
cglfw3.glfwSetMonitorCallback(monitorfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:727:34: Cannot assign type 'void (GLFWmonitor *, int) except *' to 'GLFWmonitorfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWmonitor *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowRefreshCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowrefreshfun_cb)
def SetWindowFocusCallback(Window window, cbfun):
global _windowfocusfuns
_windowfocusfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowFocusCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowfocusfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:861:76: Cannot assign type 'void (GLFWwindow *, int) except *' to 'GLFWwindowfocusfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowFocusCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowfocusfun_cb)
def SetWindowIconifyCallback(Window window, cbfun):
global _windowiconifyfuns
_windowiconifyfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetWindowIconifyCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowiconifyfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:866:78: Cannot assign type 'void (GLFWwindow *, int) except *' to 'GLFWwindowiconifyfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetWindowIconifyCallback(<cglfw3.GLFWwindow*>window._this_ptr, windowiconifyfun_cb)
def SetFramebufferSizeCallback(Window window, cbfun):
global _framebuffersize
_framebuffersizefuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetFramebufferSizeCallback(<cglfw3.GLFWwindow*>window._this_ptr, framebuffersizefun_cb)
^
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetKeyCallback(<cglfw3.GLFWwindow*>window._this_ptr, keyfun_cb)
def SetCharCallback(Window window, cbfun):
global _charfuns
_charfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetCharCallback(<cglfw3.GLFWwindow*>window._this_ptr, charfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:930:69: Cannot assign type 'void (GLFWwindow *, unsigned int) except *' to 'GLFWcharfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, unsigned int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCharCallback(<cglfw3.GLFWwindow*>window._this_ptr, charfun_cb)
def SetCharModsCallback(Window window, cbfun):
global _charmodsfuns
_charmodsfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetCharModsCallback(<cglfw3.GLFWwindow*>window._this_ptr, charmodsfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:935:73: Cannot assign type 'void (GLFWwindow *, unsigned int, int) except *' to 'GLFWcharmodsfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, unsigned int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCharModsCallback(<cglfw3.GLFWwindow*>window._this_ptr, charmodsfun_cb)
def SetMouseButtonCallback(Window window, cbfun):
global _mousebuttonfuns
_mousebuttonfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetMouseButtonCallback(<cglfw3.GLFWwindow*>window._this_ptr, mousebuttonfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:940:76: Cannot assign type 'void (GLFWwindow *, int, int, int) except *' to 'GLFWmousebuttonfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, int, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetMouseButtonCallback(<cglfw3.GLFWwindow*>window._this_ptr, mousebuttonfun_cb)
def SetCursorPosCallback(Window window, cbfun):
global _cursorposfuns
_cursorposfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetCursorPosCallback(<cglfw3.GLFWwindow*>window._this_ptr, cursorposfun_cb)
^
cyglfw3/glfw3.pyx:950:76: Cannot assign type 'void (GLFWwindow *, int) except *' to 'GLFWcursorenterfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cglfw3.glfwSetCursorEnterCallback(<cglfw3.GLFWwindow*>window._this_ptr, cursorenterfun_cb)
def SetScrollCallback(Window window, cbfun):
global _scrollfuns
_scrollfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetScrollCallback(<cglfw3.GLFWwindow*>window._this_ptr, scrollfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:955:71: Cannot assign type 'void (GLFWwindow *, double, double) except *' to 'GLFWscrollfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, double, double) except *'.
Error compiling Cython file:
------------------------------------------------------------
...
cd
cglfw3.glfwSetScrollCallback(<cglfw3.GLFWwindow*>window._this_ptr, scrollfun_cb)
def SetDropCallback(Window window, cbfun):
global _dropfuns
_dropfuns[<size_t>window._this_ptr] = cbfun
cglfw3.glfwSetDropCallback(<cglfw3.GLFWwindow*>window._this_ptr, dropfun_cb)
^
------------------------------------------------------------
cyglfw3/glfw3.pyx:960:69: Cannot assign type 'void (GLFWwindow *, int, const char **) except *' to 'GLFWdropfun'. Exception values are incompatible. Suggest adding 'noexcept' to type 'void (GLFWwindow *, int, const char **) except *'.
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-5nkj3v3h/cyglfw3_e60397ffd8ec498985342e3fdd146f55/setup.py", line 52, in <module>
ext_modules = cythonize(ext_modules)
File "/home/mona/.local/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
cythonize_one(*args)
File "/home/mona/.local/lib/python3.10/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: cyglfw3/glfw3.pyx
Compiling cyglfw3/glfw3.pyx because it changed.
[1/1] Cythonizing cyglfw3/glfw3.pyx
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
系统信息:
(clean-pvnet) mona@ada:~$ uname -a
Linux ada 6.2.0-36-generic #37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct 9 15:34:04 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
(clean-pvnet) mona@ada:~$ lsb_release -a
LSB Version: core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
(clean-pvnet) mona@ada:~$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
(clean-pvnet) mona@ada:~$ python3
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] on linux
这个包是我正在设置的名为 PVNET 的框架的要求。
答: 暂无答案
评论