librealsense: Could not find a version that satisfies the requirement pyrealsense2


Required Info
Camera Model D415
Operating System & Version Linux Ubuntu 16
Kernel Version (Linux Only) 4.4.38-tegra
Platform NVIDIA Jetson TX2 L4T 28.2.1
Language python
Segment Robot

Issue Description

When trying to download pyrealsense2 using pip2 i get the following message:

nvidia@tegra-ubuntu:~$ pip2 install pyrealsense2
Collecting pyrealsense2
Could not find a version that satisfies the requirement pyrealsense2 (from versions: )
No matching distribution found for pyrealsense2
You are using pip version 8.1.1, however version 18.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

pip3 and pip give out this message:

Traceback (most recent call last):
 File "/usr/bin/pip", line 9, in <module>
    from pip import main
ImportError: cannot import name main

I have looked everywhere and I found a similar post for MAC OS but it is not helpful for me. Also, I tried uninstalling and reinstalling pip and pip3 but the issue doesnt seem to go away. Any clues as to how to solve this issue or how to install the pyrealsense2 module manually?

Note: I have been using Ubuntu for about 6 months so I am not very good with it but I think pip and pip3 are not working because I upgraded them using the command above, hence the use of pip2. See #5221

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 21 (5 by maintainers)

Most upvoted comments

it worked for me with python3 on a TX-2 after following what @gavan1 did and then adding also librealsense/build/wrappers/python to the PythonPath: PYTHONPATH=$PYTHONPATH:/<ENTER_YOUR_PATH_TO_LIBRESENSE_FOLDER_HERE>/librealsense/build/wrappers/python 😃