bensondaled / pseyepy

PSEye-py: a python interface to the PS3Eye camera
Apache License 2.0
78 stars 26 forks source link

Compiling 'include ' error #15

Open u-Kotovsky opened 1 year ago

u-Kotovsky commented 1 year ago

I have problems with compiling this source. I use Windows 11 Pro, Visual Studio Build Tools 2022, Python 3.10

message.txt

zalo commented 10 months ago

To get to this error, I needed to add parentheses to the prints in the .pyx files in the Github Repo to make them Python3 compatible.

To get past this error, I needed to get the include folder from the correct libusb and add it to the directory where my python executable is.

I am now stuck on: https://github.com/bensondaled/pseyepy/issues/6 😅

EDIT: The solution is to

  1. Custom Compile LibUSB from the source code release here: https://github.com/libusb/libusb/releases

  2. Then add:

    #pragma comment(lib, "legacy_stdio_definitions.lib")

    before this line:

    #include <libusb-1.0/libusb.h>

    line in ps3eye.h.

  3. Then insert your custom compiled libusb.lib into pseyepy\pseyepy\ext\win\lib.

  4. Open up your x64 Native Tools Command Prompt, navigate to your pseyepy root folder, and run: python.exe -m pip install -e . to install it.

luislglp commented 3 months ago

Thanks for the cehcklist, zalo. I was able to install it on Windows 11 with VS 2022. However, I still faced some issues since the pseyepy library did not recognized the cameras. Maybe this is too basic, but not sure if we need somehow to install the camera drivers first. I downloaded the CL-Eye driver, tested the cameras and after that the pseyepy library worked fine.