librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

PyRealSense2 PIP issue

Open neilyoung opened this issue 5 years ago • 8 comments

Today I was testing the PIP wheel of the 2.32.1 found here https://pypi.org/project/pyrealsense2/

It seems, that only Windows and Linux is supported currently. Would be great to have at least macOS and Raspbian too.

Anyway. I tested a script on my Ubuntu 18.04 with Python3.6. Before I installed the pyrealsense2 wheel:


decades@ubuntu:~/librealsense/build$ pip3 install pyrealsense2
Collecting pyrealsense2
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/28/48/b845fb2b5fad573fce1accb40ef5d1fcdf67d22bc5d57a2205b3dfb1e23d/pyrealsense2-2.32.1.1299-cp36-cp36m-manylinux1_x86_64.whl (9.1MB)
    100% |████████████████████████████████| 9.1MB 147kB/s 
Installing collected packages: pyrealsense2
Successfully installed pyrealsense2-2.32.1.1299
decades@ubuntu:~/librealsense/build$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyrealsense2 as rs
>>> print(rs.__version__)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'pyrealsense2' has no attribute '__version__'
>>> 

So there is a complain, that pyrealsens2 has no attribute 'version'

I deinstalled the wheel and installed 2.32.1 python bindings from source. This is the result then:

decades@ubuntu:~/librealsense/build$ python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyrealsense2 as rs
>>> print(rs.__version__)
2.32.1

OK, twice the same version, different result. Should that be the case?

neilyoung avatar Feb 05 '20 12:02 neilyoung

The most recent mention of pip install for MacOS that I know of was in March 2019. At the time, the status was that it was something that was being looked at but was taking some time.

https://github.com/IntelRealSense/librealsense/issues/3260#issuecomment-469361152

MartyG-RealSense avatar Feb 05 '20 12:02 MartyG-RealSense

@MartyG-RealSense Thanks, but macOS is now not my biggest concern. I'm wondering, why two more ore less identical versions can show a different behaviour. I know that the version thing was added lately. Has it just been forgotten by the "Wheelies"?

neilyoung avatar Feb 05 '20 12:02 neilyoung

I'll have to defer that question to one of the Intel guys, as it is "outside of my wheel-house", as they say!

MartyG-RealSense avatar Feb 05 '20 12:02 MartyG-RealSense

Thanks :) Let 'em roll :)

neilyoung avatar Feb 05 '20 12:02 neilyoung


@neilyoung Is your request to add the attribute 'version' for Linux/Windows? Looking forward to your reply. Thanks!

Exactly

neilyoung avatar Feb 14 '20 06:02 neilyoung


@neilyoung Thanks for the quick reply! Already feedback this to the engineering team. Any update will let you know. Thanks!

pyrealsense support both version types today at Linux and Windows.

__version__ and __full_version__

Is this issue resolved?

Nir-Az avatar May 26 '24 10:05 Nir-Az

@neilyoung Could you please update if current implementation resolves your issue? Thanks!

sherrysun2018 avatar Jun 04 '24 03:06 sherrysun2018

You are seriously asking me for a problem I probably had four (in words f o u r) years ago with a product, which is stone dead since at least that long? We must be living in different worlds :)

neilyoung avatar Jun 04 '24 05:06 neilyoung