pseyepy icon indicating copy to clipboard operation
pseyepy copied to clipboard

Setup

Open Noct-Blib opened this issue 1 year ago • 5 comments

I simply cant get past the setup.py -Running Windows11 -Python 3.11.4 -also tried python3.8

C:\Users\Luziv\Documents\Running_Projects\4D_Capture\Pseye\pseyepy>python setup.py install C:\Users\Luziv\Documents\Running_Projects\4D_Capture\Pseye\pseyepy\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:\Users\Luziv\anaconda3\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\Luziv\Documents\Running_Projects\4D_Capture\Pseye\pseyepy\pseyepy\cameras.pyx tree = Parsing.p_module(s, pxd, full_module_name) C:\Users\Luziv\anaconda3\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:\Users\Luziv\anaconda3\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 https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!! self.initialize_options() cl : Command line warning D9002 : ignoring unknown option '-std=c++11' cameras.cpp C:\Users\Luziv\Documents\Running_Projects\4D_Capture\Pseye\pseyepy\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\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe' failed with exit code 2

C:\Users\Luziv\Documents\Running_Projects\4D_Capture\Pseye\pseyepy>python setup.py install C:\Users\Luziv\Documents\Running_Projects\4D_Capture\Pseye\pseyepy\setup.py:48: UserWarning: Setup params not yet fully tested for Windows. warnings.warn('Setup params not yet fully tested for Windows.') C:\Users\Luziv\anaconda3\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:\Users\Luziv\anaconda3\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 https://github.com/pypa/setuptools/issues/917 for details.
    ********************************************************************************

!! self.initialize_options() cl : Command line warning D9002 : ignoring unknown option '-std=c++11' cameras.cpp pseyepy/cameras.cpp(17207): warning C4551: function call missing argument list cl : Command line warning D9002 : ignoring unknown option '-std=c++11' ps3eye.cpp cl : Command line warning D9002 : ignoring unknown option '-std=c++11' ps3eye_capi.cpp LINK : warning LNK4044: unrecognized option '/std=c++11'; ignored Creating library build\temp.win-amd64-cpython-311\Release\pseyepy\cameras.cp311-win_amd64.lib and object build\temp.win-amd64-cpython-311\Release\pseyepy\cameras.cp311-win_amd64.exp libusb-1.0.lib(core.obj) : error LNK2001: unresolved external symbol __imp__iob libusb-1.0.lib(windows_winusb.obj) : error LNK2001: unresolved external symbol __imp_sprintf libusb-1.0.lib(windows_winusb.obj) : error LNK2001: unresolved external symbol __imp_sscanf build\lib.win-amd64-cpython-311\pseyepy\cameras.cp311-win_amd64.pyd : fatal error LNK1120: 3 unresolved externals error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe' failed with exit code 1120

Noct-Blib avatar Dec 08 '23 23:12 Noct-Blib

~~I'm stuck at exactly the same point.~~ I don't have much experience with compliling and linking but the cause seemed to be that the provided libusb-1.0.lib is not compatible with the visual studio compiler. I got it working by replacing the one in pseyepy\ext\win\lib with the one from libusb-1.0.26-binaries\VS2015-x64\dll\ inside the archive that can be downloaded here and I also needed the .dll from there.

XenoTheDragon avatar Dec 09 '23 10:12 XenoTheDragon

Can you explain what exactly you did to get it working?

NikTechT avatar Jan 04 '24 20:01 NikTechT

Can you explain what exactly you did to get it working?

If I remember correctly the first step was to fix some print functions that were incompatible with my python version and then just what I described above. What kind of problems are you having?

XenoTheDragon avatar Jan 05 '24 16:01 XenoTheDragon

Where exactly did you put the dll? I get the error dll not found when running example script: DLL load failed while importing cameras

NikTechT avatar Jan 05 '24 17:01 NikTechT

I put it directly into the directory of the installed python script but you usually can also put it into the system32 folder.

XenoTheDragon avatar Jan 06 '24 08:01 XenoTheDragon