I have installed OpenCV on the Occidentalis operating system (a variant of Raspbian) on a Raspberry Pi, using jayrambhia’s script found here. It installed version 2.4.5.
When I try import cv2
in a Python program, I get the following message:
pi@raspberrypi~$ python cam.py Traceback (most recent call last) File "cam.py", line 1, in <module> import cv2 ImportError: No module named cv2
The file cv2.so
is stored in /usr/local/lib/python2.7/site-packages/...
There are also folders in /usr/local/lib
called python3.2 and python2.6, which could be a problem but I’m not sure.
Is this a path error perhaps? Any help is appreciated, I am new to Linux.
Related Posts:
- Cannot find module cv2 when using OpenCV
- Cannot find module cv2 when using OpenCV
- ImportError: numpy.core.multiarray failed to import
- ImportError: numpy.core.multiarray failed to import
- TypeError: ‘int’ object is not callable
- Python ‘If not’ syntax [duplicate]
- RuntimeWarning: invalid value encountered in divide
- WinError 2 The system cannot find the file specified (Python)
- IndexError: tuple index out of range —– Python
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- How to resize an image with OpenCV2.0 and Python2.6
- TypeError: cannot perform reduce with flexible type
- Could not find a version that satisfies the requirement tensorflow
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- Could not find a version that satisfies the requirement tensorflow
- Local variable referenced before assignment?
- Python Traceback (most recent call last)
- import opencv vs import cv2
- How to pip or easy_install tkinter on Windows
- How to remove \xa0 from string in Python?
- What is the meaning of [:] in python [duplicate]
- Permission denied error by installing matplotlib
- Why are Python’s ‘private’ methods not actually private?
- How do I install Python OpenCV through Conda?
- Remove list from list in Python
- How to create a new text file using Python
- TypeError: write() argument must be str, not bytes (Python 3 vs Python 2 )
- python socket.error: [Errno 98] Address already in use
- How to import files in python using sys.path.append?
- How can I upgrade NumPy?
- How do I install the yaml package for Python?
- Change figure size and figure format in matplotlib
- how does \r (carriage return) work in Python
- What is Python buffer type for?
- AttributeError(“‘str’ object has no attribute ‘read'”)
- Python Save to file
- Add list to set?
- Difference in output with waitKey(0) and waitKey(1)
- Create 3D array using Python
- ImportError: No module named scipy
- Checking whether pip is installed?
- Decoding UTF-8 strings in Python
- How can I read pdf in python?
- How to have an array of arrays in Python
- ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?
- ValueError: unsupported pickle protocol: 3, python2 pickle can not load the file dumped by python 3 pickle?
- AttributeError(“‘str’ object has no attribute ‘read'”)
- How to use 2to3 properly for python?
- Why does using from __future__ import print_function breaks Python2-style print?
- OpenCV NoneType object has no attribute shape
- Python – ‘ascii’ codec can’t decode byte
- Python Error – int object has no attribute
- Difference between scikit-learn and sklearn
- Loading a file with more than one line of JSON into Pandas
- SystemError: new style getargs format but argument is not a tuple?
- Type error Unhashable type:set
- How to detect key presses?
- What is the difference between json.load() and json.loads() functions
- Python: count repeated elements in the list
- How to XOR two strings in Python
- TypeError: ‘_io.TextIOWrapper’ object is not subscriptable
- ImportError: No module named ‘cv2’ Python3
- Python 101: Can’t open file: No such file or directory
- Split a python list into other “sublists” i.e smaller lists
- TypeError: argument of type ‘NoneType’ is not iterable
- Cannot import cv2 in python in OSX
- ImportError: No module named cv2
- If list index exists, do X
- OpenCV NoneType object has no attribute shape
- Numpy, multiply array with scalar
- TypeError: coercing to Unicode: need string or buffer, list found
- Installation of pygame with Anaconda
- urllib and “SSL: CERTIFICATE_VERIFY_FAILED” Error
- How to crop an image in OpenCV using Python
- ImportError: cannot import name NUMPY_MKL
- Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support
- How can I copy a Python string?
- TypeError: super() takes at least 1 argument (0 given) error is specific to any python version?
- Convert string to variable name in python
- What is the meaning of “int(a[::-1])” in Python?
- Adding +1 to a variable inside a function
- cmake error ‘the source does not appear to contain CMakeLists.txt’
- ValueError: The channel sent is invalid on a Raspberry Pi – Controlling GPIO Pin 2 (BOARD) using Python causes Error
- inverting image in Python with OpenCV
- dump() missing 1 required positional argument: ‘fp’ in python json
- How to completely uninstall python 2.7.13 on Ubuntu 16.04
- Spell Checker for Python
- ‘instancemethod’ object has no attribute ‘__getitem__’ with class variables
- Installing scipy for python 2.7
- Install py2exe for python 2.7 over pip: this package requires Python 3.3 or later
- ImportError: No module named IPython
- OpenCV houghLinesP parameters
- How can I install a .egg Python package on Windows (attempt using easy_install not working)
- In python, how can I print lines that do NOT contain a certain string, rather than print lines which DO contain a certain string:
- input() error – NameError: name ‘…’ is not defined
- Symbol not found: __PyCodecInfo_GetIncrementalDecoder
- Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew’s Python installed
- Python OpenCV2 (cv2) wrapper to get image size?
- Cannot remove entries from nonexistent file
- ValueError: total size of new array must be unchanged