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

Cannot install the setup.py file #22

Open
ZackYounger opened this issue Dec 27, 2023 · 15 comments
Open

Cannot install the setup.py file #22

ZackYounger opened this issue Dec 27, 2023 · 15 comments

Comments

@ZackYounger
Copy link

Cannot seem to install the setup.py file

-Running Windows 10
-Python 3.9.7

I get the error message:

(base) PS C:\Users\Zack\OneDrive\desktop\gps\pseyepy-master> python setup.py install
C:\Users\Zack\OneDrive\desktop\gps\pseyepy-master\setup.py:48: UserWarning: Setup params not yet fully tested for Windows.
  warnings.warn('Setup params not yet fully tested for Windows.')
running install
running build
running build_py
running build_ext
building 'pseyepy.cameras' extension
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include\libusb-1.0 -IC:\Users\Zack\anaconda3\include -IC:\Users\Zack\anaconda3\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tppseyepy/cameras.cpp /Fobuild\temp.win-amd64-3.9\Release\pseyepy/cameras.obj -std=c++11
cl : Command line warning D9002 : ignoring unknown option '-std=c++11'
cameras.cpp
C:\Users\Zack\OneDrive\desktop\gps\pseyepy-master\pseyepy\src\ps3eye.h(20): fatal error C1083: Cannot open include file: 'libusb-1.0/libusb.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

I am currently trying to do this in an anaconda environment by first running

conda install -c conda-forge libusb

But have tried both with and without anaconda.

I do not have a lot of experience in installing libraries without pip so any sort of help would be greatly appreciates.

@104player
Copy link

Hi, to get mine to build on windows I made these changes :
ea7a6d3

as well as using a newer libusb-1.0.lib like in : #20

Now I'm kind of wondering if I should have included the updated libusb-1.0.lib in my PR as well ?

And possibly split my PR #23 into two (one for windows / python3 build fixes, one for a Python locking / threading improvement / fix)

@high993
Copy link

high993 commented Mar 1, 2024

Can you please add the correct libusb in your PR.... I've been trying so many libusb files with no avail.. it would be much appreciated thnaks!

@104player
Copy link

my PR has been updated to include the libusb-1.0 that I used.

@whatzup1243
Copy link

what happened to this error when i wanted to run the setup.py :
Traceback (most recent call last): File "D:\drones\py\pseyepy-master\pseyepy-master\setup.py", line 1, in <module> from distutils.core import setup ModuleNotFoundError: No module named 'distutils'

@LosWheatleynDew
Copy link

For me i get a big mess of
i tried the libusb-win32 installation
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include -IC:\Users\Maru\Desktop\discordpy\tutorialopencv\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tppseyepy/cameras.cpp /Fobuild\temp.win32-cpython-310\Release\pseyepy/cameras.obj -std=c++11 cl : Command line warning D9002 : ignoring unknown option '-std=c++11' cameras.cpp pseyepy/cameras.cpp(17233): warning C4551: function call missing argument list "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include -IC:\Users\Maru\Desktop\discordpy\tutorialopencv\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tppseyepy/src/ps3eye.cpp /Fobuild\temp.win32-cpython-310\Release\pseyepy/src/ps3eye.obj -std=c++11 cl : Command line warning D9002 : ignoring unknown option '-std=c++11' ps3eye.cpp "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include -IC:\Users\Maru\Desktop\discordpy\tutorialopencv\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tppseyepy/src/ps3eye_capi.cpp /Fobuild\temp.win32-cpython-310\Release\pseyepy/src/ps3eye_capi.obj -std=c++11 cl : Command line warning D9002 : ignoring unknown option '-std=c++11' ps3eye_capi.cpp "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:pseyepy/ext/win/lib /LIBPATH:C:\Users\Maru\Desktop\discordpy\tutorialopencv\libs "/LIBPATH:C:\Program Files\Python310\libs" "/LIBPATH:C:\Program Files\Python310" /LIBPATH:C:\Users\Maru\Desktop\discordpy\tutorialopencv\PCbuild\win32 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22000.0\\um\x86" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22000.0\\um\x86" libusb-1.0.lib /EXPORT:PyInit_cameras build\temp.win32-cpython-310\Release\pseyepy/cameras.obj build\temp.win32-cpython-310\Release\pseyepy/src/ps3eye.obj build\temp.win32-cpython-310\Release\pseyepy/src/ps3eye_capi.obj /OUT:build\lib.win32-cpython-310\pseyepy\cameras.cp310-win_amd64.pyd /IMPLIB:build\temp.win32-cpython-310\Release\pseyepy\cameras.cp310-win_amd64.lib -std=c++11 LINK : warning LNK4044: unrecognized option '/std=c++11'; ignored Creating library build\temp.win32-cpython-310\Release\pseyepy\cameras.cp310-win_amd64.lib and object build\temp.win32-cpython-310\Release\pseyepy\cameras.cp310-win_amd64.exp cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_List cameras.obj : error LNK2001: unresolved external symbol __imp__PyBaseObject_Type cameras.obj : error LNK2001: unresolved external symbol __imp___PyDict_NewPresized cameras.obj : error LNK2001: unresolved external symbol __imp__PyGC_Enable cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetAttr cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_InternFromString cameras.obj : error LNK2001: unresolved external symbol __imp__PyCFunction_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyOS_snprintf cameras.obj : error LNK2001: unresolved external symbol __imp__PyThreadState_Get cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_Exception cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_InPlaceTrueDivide cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyCode_NewEmpty cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_GivenExceptionMatches cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsUnsignedLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Malloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_WarnEx cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_RuntimeWarning cameras.obj : error LNK2001: unresolved external symbol __imp__PyFrame_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsSsize_t cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_DeprecationWarning cameras.obj : error LNK2001: unresolved external symbol __imp___PyDict_SetItem_KnownHash cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_KeyError cameras.obj : error LNK2001: unresolved external symbol __imp__Py_LeaveRecursiveCall cameras.obj : error LNK2001: unresolved external symbol __imp__PySlice_Type cameras.obj : error LNK2001: unresolved external symbol __imp___PyLong_AsByteArray cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_ImportModuleLevelObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_Occurred cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromSsize_t cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GenericGetAttr cameras.obj : error LNK2001: unresolved external symbol __imp__PyTraceBack_Here cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_SetSlice cameras.obj : error LNK2001: unresolved external symbol __imp___PyThreadState_UncheckedGet cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_RuntimeError cameras.obj : error LNK2001: unresolved external symbol __imp__PyMethod_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetAttrString cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_UnTrack cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Hash cameras.obj : error LNK2001: unresolved external symbol __imp__PyInterpreterState_GetID cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromUnsignedLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__Py_GetVersion cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttr cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsUnsignedLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyBytes_AsStringAndSize cameras.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_New cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_Contains cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_SetItemString cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Size cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyFloat_FromDouble cameras.obj : error LNK2001: unresolved external symbol __imp__PyGC_Disable cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_AttributeError cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_GetSlice cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Multiply cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetString cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ZeroDivisionError cameras.obj : error LNK2001: unresolved external symbol __imp__PyIter_Next cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetIter cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Add cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_WarnFormat cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ValueError cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromUnsignedLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Next cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_RichCompare cameras.obj : error LNK2001: unresolved external symbol __imp__PyBool_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_Type cameras.obj : error LNK2001: unresolved external symbol __imp___Py_FalseStruct cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_GetModule cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_InPlaceAdd cameras.obj : error LNK2001: unresolved external symbol __imp__PyFloat_Type cameras.obj : error LNK2001: unresolved external symbol __imp___PyLong_FromByteArray cameras.obj : error LNK2001: unresolved external symbol __imp__PyModule_NewObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyMethod_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyType_IsSubtype cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Subtract cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Join cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_OverflowError cameras.obj : error LNK2001: unresolved external symbol __imp__PyCode_NewWithPosOnlyArgs cameras.obj : error LNK2001: unresolved external symbol __imp___Py_Dealloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_GetItem cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_GetModuleDict cameras.obj : error LNK2001: unresolved external symbol __imp__PyModule_GetDict cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_GetSlice cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Free cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_ExceptionMatches cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Dir cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_Del cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyDescr_IsData cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_ClearWeakRefs cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Init cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Not cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_AsUTF8 cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromFormat cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_InPlaceMultiply cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_New cameras.obj : error LNK2001: unresolved external symbol __imp__PySlice_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_IsFinalized cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_AddModule cameras.obj : error LNK2001: unresolved external symbol __imp__PyType_Ready cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_Append cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Decode cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsDouble cameras.obj : error LNK2001: unresolved external symbol __imp___PyObject_GenericGetAttrWithDict cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_VectorcallDict cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_SetItem cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_CallFinalizerFromDealloc cameras.obj : error LNK2001: unresolved external symbol __imp___PyDict_GetItem_KnownHash cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsInstance cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Index cameras.obj : error LNK2001: unresolved external symbol __imp__PyMem_Free cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_StopIteration cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_NoMemory cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_GetItemString cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetItem cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_CallObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyModuleDef_Init cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_Track cameras.obj : error LNK2001: unresolved external symbol __imp__PyBytes_FromStringAndSize cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Long cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Compare cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsSubclass cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_TypeError cameras.obj : error LNK2001: unresolved external symbol __imp__PyMem_Realloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsTrue cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Copy cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_NameError cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_Pack cameras.obj : error LNK2001: unresolved external symbol __imp___PyByteArray_empty_string cameras.obj : error LNK2001: unresolved external symbol __imp__Py_OptimizeFlag cameras.obj : error LNK2001: unresolved external symbol __imp___PyUnicode_Ready cameras.obj : error LNK2001: unresolved external symbol __imp__PyMem_Malloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_AsTuple cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_IndexError cameras.obj : error LNK2001: unresolved external symbol __imp__Py_EnterRecursiveCall cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ImportError cameras.obj : error LNK2001: unresolved external symbol __imp___Py_TrueStruct cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_SystemError cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetItem cameras.obj : error LNK2001: unresolved external symbol __imp___PyObject_GC_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyException_SetCause cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_TrueDivide cameras.obj : error LNK2001: unresolved external symbol __imp__PyTraceBack_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromString cameras.obj : error LNK2001: unresolved external symbol __imp___PyType_Lookup cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Size cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Call cameras.obj : error LNK2001: unresolved external symbol __imp__PyByteArray_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyType_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_Tuple cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromStringAndSize cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ModuleNotFoundError cameras.obj : error LNK2001: unresolved external symbol __imp___PyObject_GetDictPtr ps3eye.obj : error LNK2001: unresolved external symbol _libusb_free_config_descriptor@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_device_list@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_init@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_claim_interface@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_active_config_descriptor@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_device_descriptor@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_exit@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_device@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_handle_events_timeout_completed@12 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_ref_device@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_clear_halt@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_bus_number@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_port_numbers@12 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_open@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_unref_device@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_alloc_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_free_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_submit_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_release_interface@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_attach_kernel_driver@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_set_debug@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_detach_kernel_driver@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_free_device_list@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_cancel_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_close@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_control_transfer@32 ps3eye_capi.obj : error LNK2001: unresolved external symbol __imp__PyEval_SaveThread ps3eye_capi.obj : error LNK2001: unresolved external symbol __imp__PyEval_RestoreThread build\lib.win32-cpython-310\pseyepy\cameras.cp310-win_amd64.pyd : fatal error LNK1120: 192 unresolved externals error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x86\\link.exe' failed with exit code 1120

@LosWheatleynDew
Copy link

So heres my troubleshooting step to get this working
Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choosed MS64

@whatzup1243
Copy link

So heres my troubleshooting step to get this working Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choosed MS64

I have met the same wrong messages you met.May you describe your solutions clearer?

@whatzup1243
Copy link

So heres my troubleshooting step to get this working Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choos

So heres my troubleshooting step to get this working Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choosed MS64

Can you illustrate step3 clearer

@LosWheatleynDew
Copy link

So heres my troubleshooting step to get this working Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choos

So heres my troubleshooting step to get this working Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choosed MS64

Can you illustrate step3 clearer

In ext/win/include/lib I replace the existing files with the latest version of libusb downloaded in https://github.com/libusb/libusb/releases that matches the compiler that i have installed in my system. in this case i have VS2022 so i go to the downloaded releases of libusb. open the zip and went to vs2022/ms64/dll and copy all of the files in there to ext/win/include/lib
To clear up step 2 you also change libusb.h in ext/win/include/libusb-1.0 to the latest version downloaded

@NicholasduToit
Copy link

com

"4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages"

Did "python setup.py install" run without errors? I dont get a module folder or site-packages

@LosWheatleynDew
Copy link

com

"4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages"

Did "python setup.py install" run without errors? I dont get a module folder or site-packages

i ran python setup.py install again and this time it found my python module and automatically installed it without any issues.
I probably ran without "install" so it pasted the built files into the source folder or build folder. Then i moved those files into the site-packages folder where the python library exists

@NicholasduToit
Copy link

"4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages"
Did "python setup.py install" run without errors? I dont get a module folder or site-packages

i ran python setup.py install again and this time it found my python module and automatically installed it without any issues. I probably ran without "install" so it pasted the built files into the source folder or build folder. Then i moved those files into the site-packages folder where the python library exists

Thank you, though despite doing exactly as you have described, i get the following error:

setup.py:48: UserWarning: Setup params not yet fully tested for Windows. warnings.warn('Setup params not yet fully tested for Windows.') Compiling pseyepy/cameras.pyx because it changed. [1/1] Cythonizing pseyepy/cameras.pyx C:\Python38\lib\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: C:\Users\Nicholas\source\repos\pseyepy\pseyepy\cameras.pyx tree = Parsing.p_module(s, pxd, full_module_name) C:\Python38\lib\site-packages\setuptools_distutils\cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running setup.py directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() C:\Python38\lib\site-packages\setuptools_distutils\cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated. !! ******************************************************************************** Please avoid running setup.py and easy_install. Instead, use pypa/build, pypa/installer or other standards-based tools. See pypa/setuptools#917 for details. ******************************************************************************** !! self.initialize_options() error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/

This is running windows 10, VS 2022, and having updated the syntax, libusb.h and libusb.lib files.
I ran cl to check my complier and get the following:
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30154 for x64.

I have also ensured i have all the necessary tick boxes correct when i installed vs2022, having reinstalled it, tried vs2019 with associated files and installed vs build tools I have now sucummbed and given up.
If anyone could help i would be very grateful.

@AliHusseinAlmoussawi
Copy link

For me i get a big mess of i tried the libusb-win32 installation "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include -IC:\Users\Maru\Desktop\discordpy\tutorialopencv\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tppseyepy/cameras.cpp /Fobuild\temp.win32-cpython-310\Release\pseyepy/cameras.obj -std=c++11 cl : Command line warning D9002 : ignoring unknown option '-std=c++11' cameras.cpp pseyepy/cameras.cpp(17233): warning C4551: function call missing argument list "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include -IC:\Users\Maru\Desktop\discordpy\tutorialopencv\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tppseyepy/src/ps3eye.cpp /Fobuild\temp.win32-cpython-310\Release\pseyepy/src/ps3eye.obj -std=c++11 cl : Command line warning D9002 : ignoring unknown option '-std=c++11' ps3eye.cpp "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Ipseyepy/src -Ipseyepy\ext\win\include -IC:\Users\Maru\Desktop\discordpy\tutorialopencv\include "-IC:\Program Files\Python310\include" "-IC:\Program Files\Python310\Include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22000.0\\cppwinrt" /EHsc /Tppseyepy/src/ps3eye_capi.cpp /Fobuild\temp.win32-cpython-310\Release\pseyepy/src/ps3eye_capi.obj -std=c++11 cl : Command line warning D9002 : ignoring unknown option '-std=c++11' ps3eye_capi.cpp "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX86\x86\link.exe" /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:pseyepy/ext/win/lib /LIBPATH:C:\Users\Maru\Desktop\discordpy\tutorialopencv\libs "/LIBPATH:C:\Program Files\Python310\libs" "/LIBPATH:C:\Program Files\Python310" /LIBPATH:C:\Users\Maru\Desktop\discordpy\tutorialopencv\PCbuild\win32 "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22000.0\\um\x86" "/LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.22000.0\ucrt\x86" "/LIBPATH:C:\Program Files (x86)\Windows Kits\10\\lib\10.0.22000.0\\um\x86" libusb-1.0.lib /EXPORT:PyInit_cameras build\temp.win32-cpython-310\Release\pseyepy/cameras.obj build\temp.win32-cpython-310\Release\pseyepy/src/ps3eye.obj build\temp.win32-cpython-310\Release\pseyepy/src/ps3eye_capi.obj /OUT:build\lib.win32-cpython-310\pseyepy\cameras.cp310-win_amd64.pyd /IMPLIB:build\temp.win32-cpython-310\Release\pseyepy\cameras.cp310-win_amd64.lib -std=c++11 LINK : warning LNK4044: unrecognized option '/std=c++11'; ignored Creating library build\temp.win32-cpython-310\Release\pseyepy\cameras.cp310-win_amd64.lib and object build\temp.win32-cpython-310\Release\pseyepy\cameras.cp310-win_amd64.exp cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_List cameras.obj : error LNK2001: unresolved external symbol __imp__PyBaseObject_Type cameras.obj : error LNK2001: unresolved external symbol __imp___PyDict_NewPresized cameras.obj : error LNK2001: unresolved external symbol __imp__PyGC_Enable cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetAttr cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_InternFromString cameras.obj : error LNK2001: unresolved external symbol __imp__PyCFunction_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyOS_snprintf cameras.obj : error LNK2001: unresolved external symbol __imp__PyThreadState_Get cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_Exception cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_InPlaceTrueDivide cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyCode_NewEmpty cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_GivenExceptionMatches cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsUnsignedLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Malloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_WarnEx cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_RuntimeWarning cameras.obj : error LNK2001: unresolved external symbol __imp__PyFrame_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsSsize_t cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_DeprecationWarning cameras.obj : error LNK2001: unresolved external symbol __imp___PyDict_SetItem_KnownHash cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_KeyError cameras.obj : error LNK2001: unresolved external symbol __imp__Py_LeaveRecursiveCall cameras.obj : error LNK2001: unresolved external symbol __imp__PySlice_Type cameras.obj : error LNK2001: unresolved external symbol __imp___PyLong_AsByteArray cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_ImportModuleLevelObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_Occurred cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromSsize_t cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GenericGetAttr cameras.obj : error LNK2001: unresolved external symbol __imp__PyTraceBack_Here cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_SetSlice cameras.obj : error LNK2001: unresolved external symbol __imp___PyThreadState_UncheckedGet cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_RuntimeError cameras.obj : error LNK2001: unresolved external symbol __imp__PyMethod_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetAttrString cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_UnTrack cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Hash cameras.obj : error LNK2001: unresolved external symbol __imp__PyInterpreterState_GetID cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromUnsignedLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__Py_GetVersion cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttr cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsUnsignedLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyBytes_AsStringAndSize cameras.obj : error LNK2001: unresolved external symbol __imp___Py_NoneStruct cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_New cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_Contains cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_SetItemString cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Size cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromLongLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyFloat_FromDouble cameras.obj : error LNK2001: unresolved external symbol __imp__PyGC_Disable cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_AttributeError cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_GetSlice cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Multiply cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_SetString cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ZeroDivisionError cameras.obj : error LNK2001: unresolved external symbol __imp__PyIter_Next cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetIter cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Add cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_WarnFormat cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ValueError cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_FromUnsignedLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Next cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_Format cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_RichCompare cameras.obj : error LNK2001: unresolved external symbol __imp__PyBool_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_Type cameras.obj : error LNK2001: unresolved external symbol __imp___Py_FalseStruct cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_GetModule cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_InPlaceAdd cameras.obj : error LNK2001: unresolved external symbol __imp__PyFloat_Type cameras.obj : error LNK2001: unresolved external symbol __imp___PyLong_FromByteArray cameras.obj : error LNK2001: unresolved external symbol __imp__PyModule_NewObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyMethod_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyType_IsSubtype cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Subtract cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Join cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_OverflowError cameras.obj : error LNK2001: unresolved external symbol __imp__PyCode_NewWithPosOnlyArgs cameras.obj : error LNK2001: unresolved external symbol __imp___Py_Dealloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_GetItem cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_GetModuleDict cameras.obj : error LNK2001: unresolved external symbol __imp__PyModule_GetDict cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_GetSlice cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Free cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_ExceptionMatches cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Dir cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_Del cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsLong cameras.obj : error LNK2001: unresolved external symbol __imp__PyDescr_IsData cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_ClearWeakRefs cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Init cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Not cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_AsUTF8 cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromFormat cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_InPlaceMultiply cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_New cameras.obj : error LNK2001: unresolved external symbol __imp__PySlice_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_IsFinalized cameras.obj : error LNK2001: unresolved external symbol __imp__PyImport_AddModule cameras.obj : error LNK2001: unresolved external symbol __imp__PyType_Ready cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetAttrString cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_Clear cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_Append cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Decode cameras.obj : error LNK2001: unresolved external symbol __imp__PyLong_AsDouble cameras.obj : error LNK2001: unresolved external symbol __imp___PyObject_GenericGetAttrWithDict cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_VectorcallDict cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_SetItem cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_CallFinalizerFromDealloc cameras.obj : error LNK2001: unresolved external symbol __imp___PyDict_GetItem_KnownHash cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsInstance cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Index cameras.obj : error LNK2001: unresolved external symbol __imp__PyMem_Free cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_StopIteration cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyErr_NoMemory cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_GetItemString cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GetItem cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_CallObject cameras.obj : error LNK2001: unresolved external symbol __imp__PyModuleDef_Init cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_GC_Track cameras.obj : error LNK2001: unresolved external symbol __imp__PyBytes_FromStringAndSize cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_Long cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_Compare cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsSubclass cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_TypeError cameras.obj : error LNK2001: unresolved external symbol __imp__PyMem_Realloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_IsTrue cameras.obj : error LNK2001: unresolved external symbol __imp__PyDict_Copy cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_NameError cameras.obj : error LNK2001: unresolved external symbol __imp__PyTuple_Pack cameras.obj : error LNK2001: unresolved external symbol __imp___PyByteArray_empty_string cameras.obj : error LNK2001: unresolved external symbol __imp__Py_OptimizeFlag cameras.obj : error LNK2001: unresolved external symbol __imp___PyUnicode_Ready cameras.obj : error LNK2001: unresolved external symbol __imp__PyMem_Malloc cameras.obj : error LNK2001: unresolved external symbol __imp__PyList_AsTuple cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_IndexError cameras.obj : error LNK2001: unresolved external symbol __imp__Py_EnterRecursiveCall cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ImportError cameras.obj : error LNK2001: unresolved external symbol __imp___Py_TrueStruct cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_SystemError cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_SetItem cameras.obj : error LNK2001: unresolved external symbol __imp___PyObject_GC_New cameras.obj : error LNK2001: unresolved external symbol __imp__PyException_SetCause cameras.obj : error LNK2001: unresolved external symbol __imp__PyNumber_TrueDivide cameras.obj : error LNK2001: unresolved external symbol __imp__PyTraceBack_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromString cameras.obj : error LNK2001: unresolved external symbol __imp___PyType_Lookup cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Size cameras.obj : error LNK2001: unresolved external symbol __imp__PyObject_Call cameras.obj : error LNK2001: unresolved external symbol __imp__PyByteArray_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PyType_Type cameras.obj : error LNK2001: unresolved external symbol __imp__PySequence_Tuple cameras.obj : error LNK2001: unresolved external symbol __imp__PyUnicode_FromStringAndSize cameras.obj : error LNK2001: unresolved external symbol __imp__PyExc_ModuleNotFoundError cameras.obj : error LNK2001: unresolved external symbol __imp___PyObject_GetDictPtr ps3eye.obj : error LNK2001: unresolved external symbol _libusb_free_config_descriptor@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_device_list@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_init@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_claim_interface@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_active_config_descriptor@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_device_descriptor@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_exit@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_device@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_handle_events_timeout_completed@12 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_ref_device@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_clear_halt@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_bus_number@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_get_port_numbers@12 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_open@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_unref_device@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_alloc_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_free_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_submit_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_release_interface@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_attach_kernel_driver@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_set_debug@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_detach_kernel_driver@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_free_device_list@8 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_cancel_transfer@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_close@4 ps3eye.obj : error LNK2001: unresolved external symbol _libusb_control_transfer@32 ps3eye_capi.obj : error LNK2001: unresolved external symbol __imp__PyEval_SaveThread ps3eye_capi.obj : error LNK2001: unresolved external symbol __imp__PyEval_RestoreThread build\lib.win32-cpython-310\pseyepy\cameras.cp310-win_amd64.pyd : fatal error LNK1120: 192 unresolved externals error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.37.32822\\bin\\HostX86\\x86\\link.exe' failed with exit code 1120

Hello, I am facing the same problem. Please if you have found a solution, help me if you can. Much appreciated.

@deyoyow
Copy link

deyoyow commented Sep 19, 2024

So heres my troubleshooting step to get this working Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choosed MS64

Can you explain step 4 please? I didn't seem to have any folder for the libusb dll, exp, lib, and pdb after succesful pseyepy setup.py install

@deyoyow
Copy link

deyoyow commented Sep 19, 2024

So heres my troubleshooting step to get this working Note i am on Windows 10 Pro and i have Visual Studio 2022 as my compiler

  1. I first fixed the syntax errors and setup errors listed here ea7a6d3
  2. I changed the ext/win/include/libusb-1.0/to a latest version of libusb by downloading the binaries here https://github.com/libusb/libusb/releases
  3. I also changed the ext/win/include/lib to the latest version including adding the dll with it
  4. After running python setup.py install i have to manually put the libusb's dll, exp, lib and pdb in the module folder of pseyepy in site-packages
  5. I then have to pip install image then pip install h5py (I followed the lint saying ImportError: no module named [x] and installed the missing module through pip)

Important note about the libusb binaries. Since my compiler is VS2022 i selected the vs2022 folder and choosed MS64

Can you explain step 4 please? I didn't seem to have any folder for the libusb dll, exp, lib, and pdb after succesful pseyepy setup.py install

Nvm it worked, just as @LosWheatleynDew said you need to put all the file in the dll folder into your python lib site packages (in conda you can do that with echo %CONDA_PREFIX%\Lib\site-packages)

after that just install the missing module, for me it was Pillow and H5Py and the pseyepy is working smooth.

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

8 participants