-
Notifications
You must be signed in to change notification settings - Fork 161
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
Python version #72
Comments
I got a very similar error (below). Did you find a solution?
|
could you try this PR: #69 As soon as I have time I will update all my repos to the newest Python version. |
Downgrading Python from 3.11.5 to 3.9.18 worked for me. |
The pull request #69 is only correcting the second issue reported by @nunomrm. It is not fixing the original issue that was raised here by @tclewis29. The problem is that the pybind11 version that is distributed with this code does not work with Python 3.11. I have done a pip install to get version 2.11.1 and copied the newly acquired libraries to ...\CTCWordBeamSearch-master\cpp\pybind\pybind11. This worked for me. |
@jrbastien thanks for checking, so updating pybind does the trick? That's also the option I prefer, instead of changing the original pybind sources. |
Using the sources provided in pybind 2.11.1 works with Python 3.11. Not sure now, that it will still work with older versions of Python. I haven't tested it. |
all clear, thanks. |
I updated to the newest pybind version, and successfully tested the decoder with python 3.11 and 3.12. |
Thank you for this. |
What is the most recent version of Python that is compatible with CTCWordBeamSearch? I am using Python 3.11.1 and I am getting this error, which I believe is a compatibility issue.
ltd\documents\research\datasheet project\new_env\lib\site-packages (from word-beam-search==1.0.1) (1.26.1)
Building wheels for collected packages: word-beam-search
Building wheel for word-beam-search (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [36 lines of output]
running bdist_wheel
running build
running build_ext
building 'word_beam_search' extension
creating build
creating build\temp.win-amd64-cpython-311
creating build\temp.win-amd64-cpython-311\Release
creating build\temp.win-amd64-cpython-311\Release\cpp
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Icpp/pybind/ "-ILtd\Documents\Research\Datasheet project\new_env\include" -IC:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include -IC:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\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" /EHsc /Tpcpp/Beam.cpp /Fobuild\temp.win-amd64-cpython-311\Release\cpp/Beam.obj
Beam.cpp
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Icpp/pybind/ "-IC:\Users\thomas.lewis\Documents\Research\Datasheet project\new_env\include" -IC:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include -IC:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\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" /EHsc /Tpcpp/LanguageModel.cpp /Fobuild\temp.win-amd64-cpython-311\Release\cpp/LanguageModel.obj
LanguageModel.cpp
"C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Icpp/pybind/ "-IC:\Documents\Research\Datasheet project\new_env\include" -IC:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include -IC:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\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" /EHsc /Tpcpp/NPWordBeamSearch.cpp /Fobuild\temp.win-amd64-cpython-311\Release\cpp/NPWordBeamSearch.obj
NPWordBeamSearch.cpp
C:\Users\thomas.lewis\OneDrive - Longleat Enterprises Ltd\Documents\Research\Datasheet project\CTCWordBeamSearch\cpp\pybind\pybind11\cast.h(446): error C2027: use of undefined type '_frame'
C:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include\pytypedefs.h(22): note: see declaration of '_frame'
C:\Users\thomas.lewis\OneDrive - Longleat Enterprises Ltd\Documents\Research\Datasheet project\CTCWordBeamSearch\cpp\pybind\pybind11\cast.h(448): error C2027: use of undefined type '_frame'
C:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include\pytypedefs.h(22): note: see declaration of '_frame'
C:\Users\thomas.lewis\OneDrive - Longleat Enterprises Ltd\Documents\Research\Datasheet project\CTCWordBeamSearch\cpp\pybind\pybind11\cast.h(449): error C2027: use of undefined type '_frame'
C:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include\pytypedefs.h(22): note: see declaration of '_frame'
cpp/pybind/pybind11/pybind11.h(2096): error C2039: 'frame': is not a member of '_ts'
C:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include\cpython/pystate.h(82): note: see declaration of '_ts'
cpp/pybind/pybind11/pybind11.h(2097): error C2027: use of undefined type '_frame'
C:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include\pytypedefs.h(22): note: see declaration of '_frame'
cpp/pybind/pybind11/pybind11.h(2098): error C2027: use of undefined type '_frame'
cpp/pybind/pybind11/pybind11.h(2101): error C2027: use of undefined type '_frame'
C:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include\pytypedefs.h(22): note: see declaration of '_frame'
cpp/pybind/pybind11/pybind11.h(2100): error C2660: 'PyDict_GetItem': function does not take 1 arguments
C:\Users\thomas.lewis\AppData\Local\Programs\Python\Python311\include\dictobject.h(22): note: see declaration of 'PyDict_GetItem'
cpp/pybind/pybind11/pybind11.h(2100): note: while trying to match the argument list '()'
cpp/pybind/pybind11/numpy.h(36): error C2065: 'ssize_t': undeclared identifier
cpp/pybind/pybind11/numpy.h(36): error C2338: static_assert failed: 'ssize_t != Py_intptr_t'
error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\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 word-beam-search
Running setup.py clean for word-beam-search
Failed to build word-beam-search
The text was updated successfully, but these errors were encountered: