zivid / zivid-python

Official Python package for Zivid 3D cameras
BSD 3-Clause "New" or "Revised" License
40 stars 14 forks source link

Pip is installing outdated version #283

Closed fedor-chervinskii closed 1 month ago

fedor-chervinskii commented 1 month ago

Hey there!

I just bumped our SDK to the latest version 2.13.1 - and started getting some errors in Python wrapper, seems like there were some breaking changes

Jul 17 21:50:28 circuliionserver uvicorn[1556702]:   File "/home/circuliionserver/miniconda3/envs/ev_env/lib/python3.11/site-packages/zivid/__init__.py", line 11, in <module>
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:     import zivid.projection
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:   File "/home/circuliionserver/miniconda3/envs/ev_env/lib/python3.11/site-packages/zivid/projection.py", line 4, in <module>
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:     from zivid.frame_2d import Frame2D
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:   File "/home/circuliionserver/miniconda3/envs/ev_env/lib/python3.11/site-packages/zivid/frame_2d.py", line 5, in <module>
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:     from zivid.camera_state import _to_camera_state
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:   File "/home/circuliionserver/miniconda3/envs/ev_env/lib/python3.11/site-packages/zivid/camera_state.py", line 6, in <module>
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:     class CameraState:
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:   File "/home/circuliionserver/miniconda3/envs/ev_env/lib/python3.11/site-packages/zivid/camera_state.py", line 293, in CameraState
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:     class Status:
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:   File "/home/circuliionserver/miniconda3/envs/ev_env/lib/python3.11/site-packages/zivid/camera_state.py", line 309, in Status
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:     "disappeared": _zivid.CameraState.Status.disappeared,
Jul 17 21:50:28 circuliionserver uvicorn[1556702]:                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jul 17 21:50:28 circuliionserver uvicorn[1556702]: AttributeError: type object '_zivid._zivid.Status' has no attribute 'disappeared'

However the version of python wrappers is the latest available at PyPi - 2.12.0

What's the correct way to resolve this? Any chance you can update PyPi or should I install from source?

johningve commented 1 month ago

Hi!

Unfortunately, we have not yet been able to upload the new versions to PyPI. We are waiting on a resolution from the PyPI administrators.

In the meantime, the workaround is to install the latest release from the Github releases page. I have updated the README to clarify this and provide workaround instructions. To build and install version 2.13.1, use the following command:

pip install https://github.com/zivid/zivid-python/releases/download/v2.13.1.2.13.1/zivid-2.13.1.2.13.1.tar.gz

I sincerely apologize for the inconvenience, and hope that we can resolve the situation as fast as possible!

fedor-chervinskii commented 1 month ago

Hi @johningve , thanks for your message - yes this helps, and thanks for updating the README! I hope the issue with PyPI will be resolved soon