Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Pomegranate can not be pip installed on Python 3.11 #1009

Closed
hylkedonker opened this issue Dec 21, 2022 · 4 comments
Closed

[BUG] Pomegranate can not be pip installed on Python 3.11 #1009

hylkedonker opened this issue Dec 21, 2022 · 4 comments

Comments

@hylkedonker
Copy link
Contributor

Description
When I try to pip install pomegranate on Python 3.11, it starts building wheels and eventually terminates with the following error:

      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.11 -I/tmp/pip-build-env-9ivz0_ud/overlay/lib/python3.11/site-packages/numpy/core/include -c pomegranate/MarkovChain.c -o build/temp.linux-x86_64-cpython-311/pomegranate/MarkovChain.o
      pomegranate/MarkovChain.c:208:12: fatal error: longintrepr.h: No such file or directory
        208 |   #include "longintrepr.h"
            |            ^~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' 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 pomegranate
Failed to build pomegranate
ERROR: Could not build wheels for pomegranate, which is required to install pyproject.toml-based projects

This error might be related to Cython, looking at this Cython pull request.

To Reproduce

docker run python:3.11 pip3 install pomegranate
@nigel-daniels
Copy link

I'm also seeing this error, my Python version is 0.29.33

@nigel-daniels
Copy link

I'm also seeing this error, my Python version is 0.29.33

Apologies, auto correct... Cython version is 0.29.33

@ShineQi
Copy link

ShineQi commented Mar 27, 2023

Same error on windows python 3.11 when using pip install

      building 'pomegranate.MarkovChain' extension
      "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Python311\include -IC:\Python311\Include -IC:\Users\cnxiqi4\AppData\Local\Temp\pip-build-env-d2dwy25b\overlay\Lib\site-packages\numpy\core\include "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.35.32215\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.20348.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.20348.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um" /Tcpomegranate\MarkovChain.c /Fobuild\temp.win-amd64-cpython-311\Release\pomegranate\MarkovChain.obj
      MarkovChain.c
      pomegranate\MarkovChain.c(208): fatal error C1083: Cannot open include file: 'longintrepr.h': No such file or directory
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Professional\\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 pomegranate
Failed to build pomegranate
ERROR: Could not build wheels for pomegranate, which is required to install pyproject.toml-based projects

Installed with command: python setup.py install after clone the master branch

@jmschrei
Copy link
Owner

Thank you for opening an issue. pomegranate has recently been rewritten from the ground up to use PyTorch instead of Cython (v1.0.0), and so all issues are being closed as they are likely out of date. Please re-open or start a new issue if a related issue is still present in the new codebase.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants