I installed opencv-2.4.9 on my raspberry pi.When i try to run facedetect.py sample file,i am getting that error:
Traceback (most recent call last):
File "facedetect.py", line 10,in <module>
import cv2.cv as cv
ImportError: /usr/lib/arm-linux-gnueabihf/libQtGui.so.4: undefined symbol:
How can i solve this ? I am getting the same error when compiling cpp or any other example file. Qt's version is 4.
It looks like you're either missing a shared library, or there's a version mismatch between the versions of OpenCV and Qt installed.
You'll need to check what the missing/undefined symbol is, which version of libQtGui.so provides it and then check if you have the correct version installed.
Related
I am trying to install the following package in my MacOS High Sierra 10.13.6:
https://github.com/Michalychforever/CLASS-PT
When i run the make file everything looks to work fine. It not only generate an executable, which i can run by terminal using the ./ command, but also a python wrapper. The problem is related only with the former.
When i try to import the library i get the following message:
import classy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so, 2): Symbol not found: _zdotu_
Referenced from: /Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so
Expected in: flat namespace
in /Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so
I am using the built-in python version (i.e 2.7.10). I already installed the Xcode 10.1 together with command line commands. My .bash_profile is:
export PATH="/Users/thiagomergulhao/Library/Python/2.7/bin:$PATH"
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
Does anyone have any ideia what is causing this problem?
I am creating a joint project using both Python and R in Visual Studio. I imported Tkinter from Python to create the interface and using R via rpy2 for analyzing data. I am stuck with this error code:
Fatal Python error: init_sys_streams: can't initialize sys standard streams
Traceback (most recent call last):
File "C:\Users\15309\OneDrive\Desktop\Python\Lib\io.py", line 54, in <module>
ImportError: cannot import name 'open_code' from 'io' (unknown location)
I am using Python 3.7 in Visual Studio and rpy2 is imported from Anaconda's Python 3.7. My instructor and I have not been able to figure out how to fix it. What do we need to do?
I guess your filename is io.py
Change its name to something else.
I need to use QT and pyside for a school project so hope to install pyside on my computer.
I struggled a little bit to install pyside and I eventually got pyside 1.2.4 installed using pip on both python 2.7 and 3.4.
However when I tried to use pyside-uic or import PySide.QtCore I got this error message:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Library/Python/2.7/site-packages/PySide/QtCore.so, 2): Library not loaded: #rpath/libpyside-python2.7.1.2.dylib
Referenced from: /Library/Python/2.7/site-packages/PySide/QtCore.so
Reason: image not found
I have been working on this for hours and tried to reinstall with macport.
I also tried to link QtCore.framework from other directory using:
ln -vis /usr/local/Cellar/qt/4.8.7_2/lib/QtCore.Framework /Library/Python/2.7/site-packages/PySide/QtCore.Framwork
nothing worked out and I'm still getting the same error.
Please help and thank you guys so much.
Did you try to set DYLD_LIBRARY_PATH ?
export DYLD_LIBRARY_PATH=/Users/you/virtualenv/lib/python2.7/site-packages/PySide
See here : https://github.com/PySide/PySide/issues/129
I'm using Kivy on Mac OS X. I installed opencv under Kivy's virtualenv. But then when I tried
import cv2
it gave me this Import Error:
Traceback (most recent call last):
File "", line 1, in
ImportError: dlopen(/Applications/Kivy.app/Contents/Resources/venv/lib/python2.7/site-packages/cv2.so, 2): Library not loaded: lib/libopencv_reg.3.1.dylib
Referenced from: /Applications/Kivy.app/Contents/Resources/venv/lib/python2.7/site-packages/cv2.so
Reason: image not found
But if I move to: cd /path/to/opencv/build
then run python and import cv2, it works fine.
It looks like Python couldn't find the library files from the build/lib directory.
Everything looked fine during the cmake bulding and installation process. What am I missing here?
Thank you!!
I am following the installation process stated here. I am stuck on step 7; I get an ImportError stating:
"RuntimeError: module compiled against API version 9 but this version of numpy is 7
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
import cv2
ImportError: numpy.core.multiarray failed to import"
In the instructions it recommends me to install the latest version of opencv, so as trial and error i tried an earlier model to see what would happen...i get the same thing -_-.
Could anyone point to me what I'm doing wrong, if there are no feasible solutions, is there a more stable process of doing this
Thanks in advance.
Someone experienced a similar error here. Make sure your numpy is up to date and don't forget to change the path to the new bin directory in your environment variable.