Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: libjasper.so.1: cannot open shared object file: No such file or directory #34

Closed
mulysatest opened this issue Apr 8, 2018 · 17 comments

Comments

@mulysatest
Copy link

mulysatest commented Apr 8, 2018

I tried to run the demoMamboVisionGUI.py but got this error msg.

ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

then I managed to solved it by this command

pip3 install opencv-python

then I got another error when try to execute the demoMamboVisionGUI.py

ImportError: libcblas.so.3: cannot open shared object file: No such file or directory

then I solved it with this command

sudo apt-get install libatlas-base-dev

no I got another error
ImportError: libjasper.so.1: cannot open shared object file: No such file or directory

How I can solve this problem? Any complete guide to install all dependencies ?

@mulysatest
Copy link
Author

mulysatest commented Apr 8, 2018

Finally I managed to solved all dependencies
Here it is


pip3 install opencv-python
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
sudo apt-get install libqtgui4
sudo apt-get install python3-pyqt5

@mulysatest
Copy link
Author

mulysatest commented Apr 8, 2018

Now I got stuck at

python3 demoMamboVisionGUI.py
trying to connect to mambo now
trying to connect to the mambo at address D0:33:78:E6:E6:11
connected! Asking for services and characteristics
magic handshake to make the drone listen to our commandsandsensors
initializing notification delegate
connected: True
sleeping
Could not find sensor in list - ignoring for now. Packet info below.
(2, 25, 3)
Could not find sensor in list - ignoring for now. Packet info below.
(2, 25, 5)
Preparing to open vision
17
/home/pi/pyparrot/images
/home/pi/pyparrot/utils
Traceback (most recent call last):
File "demoMamboVisionGUI.py", line 95, in
mamboVision.open_video()
File "/home/pi/pyparrot/DroneVisionGUI.py", line 276, in open_video
self.player = vlc.MediaPlayer(self.stream_adress, ":network-caching=" + str(self.network_caching))
File "/home/pi/pyparrot/utils/vlc.py", line 3173, in new
instance = get_default_instance()
File "/home/pi/pyparrot/utils/vlc.py", line 254, in get_default_instance
_default_instance = Instance()
File "/home/pi/pyparrot/utils/vlc.py", line 1731, in new
return libvlc_new(len(args), args)
File "/home/pi/pyparrot/utils/vlc.py", line 4406, in libvlc_new
ctypes.c_void_p, ctypes.c_int, ListPOINTER(ctypes.c_char_p))
File "/home/pi/pyparrot/utils/vlc.py", line 276, in _Cfunction
raise NameError('no function %r' % (name,))
NameError: no function 'libvlc_new'

How to solve NameError: no function 'libvlc_new??

@amymcgovern
Copy link
Owner

Sorry I haven't documented yet so I do appreciate the testing here! Those other libraries must come with anaconda as I never had to install them. As for VLC, you need to install the program VLC 3.0.1 or greater. It isn't python. It's an executable available for Mac, linux, and windows.

@mulysatest
Copy link
Author

mulysatest commented Apr 8, 2018

Got it, just installed VLC but now got this error, should I change to my own ip?

pi@raspberrypi:/pyparrot $ cat errori2.txt
:
/pyparrot $ python3 demoMamboVisionGUI.py
trying to connect to mambo now
trying to connect to the mambo at address D0:33:78:E6:E6:11
connected! Asking for services and characteristics
magic handshake to make the drone listen to our commandsandsensors
initializing notification delegate
connected: True
sleeping
Could not find sensor in list - ignoring for now. Packet info below.
(2, 25, 3)
Could not find sensor in list - ignoring for now. Packet info below.
(2, 25, 5)
Preparing to open vision
17
/home/pi/pyparrot/images
/home/pi/pyparrot/utils
[01113528] pulse audio output error: PulseAudio server connection failure: Connection refused
[01136f10] pulse audio output error: PulseAudio server connection failure: Connection refused
libEGL warning: DRI2: failed to authenticate

** (python3:4090): WARNING **: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: The name org.a11y.Bus was not provided by any .service files
Starting user vision thread
user callback being called
success from play call is 0
[60b008a8] live555 demux error: Failed to connect with rtsp://192.168.99.1/media/stream2
[60b02db8] access_realrtsp access error: cannot connect to 192.168.99.1:554
[60b02db8] core access error: Connection failed
[60b02db8] core access error: VLC could not connect to "192.168.99.1:554".
[01329f70] core input error: open of `rtsp://192.168.99.1/media/stream2' failed
[01329f70] core input error: Your input can't be opened
[01329f70] core input error: VLC is unable to open the MRL 'rtsp://192.168.99.1/media/stream2'. Check the log for details.

@mulysatest
Copy link
Author

Try to change ip to my local ip 192.168.2.99 and execute command using sudo
but still doesn't work.

screen shot 2018-04-08 at 11 03 13 pm

@amymcgovern
Copy link
Owner

Don't change your IP. That is the IP for the mambo. I assume you have a camera on your mambo? If so, connect to its wifi and use_wifi=true in your Mambo object creation. It looks like you are using BLE here since it specifies an address.

@mulysatest
Copy link
Author

I see, this code only work with fpv camera. Thank you. I will try and let you know the result .

@neurohn
Copy link

neurohn commented Jan 4, 2019

Finally I managed to solved all dependencies
Here it is


pip3 install opencv-python
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
sudo apt-get install libqtgui4
sudo apt-get install python3-pyqt5

I needed one more step after this:

sudo apt-get install libqt4-test

@amymcgovern
Copy link
Owner

Fascinating. I definitely didn't have to do all of those but maybe they are coming with anaconda. Thanks for posting!

@VipulRamtekkar
Copy link

Hi!
For people who are trying to install libjasper-dev on ubuntu 18.04 can do the following:

sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu xenial-security main'
sudo apt update
sudo apt install libjasper-dev

@stancho-stanchev
Copy link

Guys you do not need to install any updates or other libraries. The problem is because the current version of opencv (currently 4.1.1.26) is not compatible with RPi, just run pip3 uninstall opencv-python and then run pip3 install opencv-python==3.4.6.27
This should sort you out and if you have any issues just check what versions of opencv are compatible with your Raspbian or whatever you are using.

@ukBaz
Copy link

ukBaz commented Jan 6, 2020

The best instructions for installing OpenCV on the Raspberry Pi can be found at:
https://blog.piwheels.org/new-opencv-builds-including-opencv-4-x/

@dragosmacovei
Copy link

Guys you do not need to install any updates or other libraries. The problem is because the current version of opencv (currently 4.1.1.26) is not compatible with RPi, just run pip3 uninstall opencv-python and then run pip3 install opencv-python==3.4.6.27
This should sort you out and if you have any issues just check what versions of opencv are compatible with your Raspbian or whatever you are using.

i tried all the versions above and some from pyimage. Running buster, from the official site. @stancho-stanchev saved me from a lot of time waste. Thanks!

@neeraj-j
Copy link

use
sudo apt install python3-opencv
instead of pip, as suggested by https://stackoverflow.com/a/60237868/9697329

@lbblitz54
Copy link

use
sudo apt install python3-opencv
instead of pip, as suggested by https://stackoverflow.com/a/60237868/9697329

Best solution

@Mambela
Copy link

Mambela commented Jun 13, 2020

use
sudo apt install python3-opencv
instead of pip, as suggested by https://stackoverflow.com/a/60237868/9697329

I have browsed around trying to install OpenCV in my RaspberryPi.
Thank you so much for this. I have installed it successfully

@motigirmaw
Copy link

how to install
sudo apt-get install libatlas-base-dev
sudo apt-get install libjasper-dev
sudo apt-get install libqtgui4
sudo apt-get install python3-pyqt5 on windows CMD?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests