[Python] How do I fix this pyenet installation error?

Discussão em 'Python' iniciado por Stack, Fevereiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    1. I tried installing pyenet in PowerShell:

    PS C:\Users\lbonc> py -m pip install pyenet
    Collecting pyenet
    Using cached pyenet-1.3.17.tar.gz (13 kB)
    Installing build dependencies ... done
    Getting requirements to build wheel ... done
    Installing backend dependencies ... done
    Preparing metadata (pyproject.toml) ... done
    Collecting Cython<1,>=0 (from pyenet)
    Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
    Using cached Cython-0.29.37-py2.py3-none-any.whl (989 kB)
    Building wheels for collected packages: pyenet
    Building wheel for pyenet (pyproject.toml) ... error
    error: subprocess-exited-with-error

    × Building wheel for pyenet (pyproject.toml) did not run successfully.
    │ exit code: 1
    ╰─> [20 lines of output]
    running bdist_wheel
    running build
    running build_ext
    Compiling enet.pyx because it changed.
    [1/1] Cythonizing enet.pyx
    building 'enet' extension
    creating build\temp.win-amd64-cpython-313\Release
    "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DHAS_POLL -DHAS_FCNTL -DHAS_MSGHDR_FLAGS -DHAS_SOCKLEN_T -DWIN32 -DHAS_GETHOSTBYNAME_R -DHAS_GETHOSTBYADDR_R -Ienet/include/ -IC:\Users\lbonc\AppData\Local\Programs\Python\Python313\include -IC:\Users\lbonc\AppData\Local\Programs\Python\Python313\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.35.32215\ATLMFC\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcenet.c /Fobuild\temp.win-amd64-cpython-313\Release\enet.obj
    enet.c
    enet.c(887): warning C4996: 'Py_UNICODE': deprecated in 3.13
    enet.c(888): warning C4996: 'Py_UNICODE': deprecated in 3.13
    enet.c(20392): error C2198: '_PyLong_AsByteArray': too few arguments for call
    enet.c(20740): error C2198: '_PyLong_AsByteArray': too few arguments for call
    enet.c(20936): error C2198: '_PyLong_AsByteArray': too few arguments for call
    enet.c(21170): error C2198: '_PyLong_AsByteArray': too few arguments for call
    enet.c(21366): error C2198: '_PyLong_AsByteArray': too few arguments for call
    enet.c(21600): error C2198: '_PyLong_AsByteArray': too few arguments for call
    enet.c(21834): error C2198: '_PyLong_AsByteArray': too few arguments for call
    enet.c(22030): error C2198: '_PyLong_AsByteArray': too few arguments for call
    error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.35.32215\\bin\\HostX86\\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 pyenet
    Failed to build pyenet
    ERROR: Failed to build installable wheels for some pyproject.toml based projects (pyenet)


    What does this error mean? I have literally no clue what to do to fix this error. Can someone please break down this error for me to understand?

    Continue reading...

Compartilhe esta Página