I’m trying to run this program
import cv2 import time cv.NamedWindow("camera", 1) capture = cv.CaptureFromCAM(0) while True: img = cv.QueryFrame(capture) cv.ShowImage("camera", img) if cv.WaitKey(10) == 27: break cv.DestroyAllWindows()
But I’m having a problem with numpy, I’m using pyschopy along with opencv. The problem I keep getting is this error report:
RuntimeError: module compiled against API version 7 but this version of numpy is 6
Traceback (most recent call last):
File “C:\Users\John\Documents\EyeTracking\Programs\GetImage.py”, line 1, in
import cv2
ImportError: numpy.core.multiarray failed to import
I have numpy-1.6.1-py2.7 in the psychopy folder, I’m just confused as to what is wrong?
Edit (Deleted Answer)
The following command
pip install -U numpy
helps solving the problem: could not load numpy.core.multiarray.
Related Posts:
- ImportError: numpy.core.multiarray failed to import
- Cannot find module cv2 when using OpenCV
- Cannot find module cv2 when using OpenCV
- Unable to plot Double Bar, Bar plot using pyplot for ndarray
- Cannot find module cv2 when using OpenCV
- How can I upgrade NumPy?
- Numpy, multiply array with scalar
- ImportError: cannot import name NUMPY_MKL
- inverting image in Python with OpenCV
- Python OpenCV2 (cv2) wrapper to get image size?
- TypeError: ‘int’ object is not subscriptable
- ImportError: DLL load failed: The specified module could not be found
- ValueError: setting an array element with a sequence
- TypeError: ‘int’ object is not callable
- Python ‘If not’ syntax [duplicate]
- Converting dictionary to JSON
- numpy: Invalid value encountered in true_divide
- python numpy ValueError: operands could not be broadcast together with shapes
- How to fix IndexError: invalid index to scalar variable
- Could not install packages due to a “Environment error :[error 13]: permission denied : ‘usr/local/bin/f2py'”
- How does numpy.newaxis work and when to use it?
- sklearn error ValueError: Input contains NaN, infinity or a value too large for dtype(‘float64’)
- Should I use np.absolute or np.abs?
- ln (Natural Log) in Python
- What does the c underscore expression `c_` do exactly?
- Error: all the input array dimensions except for the concatenation axis must match exactly
- ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL’s are there
- ImportError: DLL load failed: %1 is not a valid Win32 application. But the DLL’s are there
- How to find all occurrences of an element in a list
- TypeError: ‘numpy.float64’ object is not callable
- ‘DataFrame’ object has no attribute ‘sort’
- ValueError: all the input arrays must have same number of dimensions
- ValueError: setting an array element with a sequence
- filename.whl is not a supported wheel on this platform
- Convert a tensor to numpy array in Tensorflow?
- How to raise a numpy array to a power? (corresponding to repeated matrix multiplications, not elementwise)
- What is dtype(‘O’), in pandas?
- What does numpy.gradient do?
- How can the Euclidean distance be calculated with NumPy?
- Check string “None” or “not” in Python 2.7
- ‘list’ object has no attribute ‘shape’
- load csv into 2D matrix with numpy for plotting
- IndexError: index 1 is out of bounds for axis 0 with size 1/ForwardEuler
- How to take column-slices of dataframe in pandas
- TypeError: unsupported operand type(s) for -: ‘list’ and ‘list’
- AttributeError: ‘datetime’ module has no attribute ‘strptime’
- Python add item to the tuple
- index 1 is out of bounds for axis 0 with size 1
- Most efficient way to reverse a numpy array
- Converting binary to decimal integer output
- No module named setuptools
- Simple plot in python of a numpy array?
- ImportError: libSM.so.6: cannot open shared object file: No such file or directory
- explain arguments meaning in res = cv2.bitwise_and(img,img,mask = mask)
- How to normalize a 2-dimensional numpy array in python less verbose?
- Understanding NumPy’s einsum
- For loop and ‘numpy.float64’ object is not iterable error
- What are the causes of overflow encountered in double_scalars besides division by zero?
- How can I remove Nan from list Python/NumPy
- How to fix: “UnicodeDecodeError: ‘ascii’ codec can’t decode byte”
- What does bitwise_and operator exactly do in openCV?
- RuntimeWarning: numpy.dtype size changed, may indicate binary incompatibility
- What is the difference between json.load() and json.loads() functions
- TypeError: Invalid dimensions for image data when plotting array with imshow()
- Copy a list of list by value and not reference
- Why I get ‘list’ object has no attribute ‘items’?
- Moving average or running mean
- How to start from second index for for-loop
- scrapy run spider from script
- python error: TypeError: an integer is required
- How to plot an array in python?
- How to create a numpy array of all True or all False?
- Removing nan values from an array
- Python Requests – No connection adapters
- How to detect key presses?
- LinAlgError: Last 2 dimensions of the array must be square
- Building multi-regression model throws error: `Pandas data cast to numpy dtype of object. Check input data with np.asarray(data).`
- ImportError in importing from sklearn: cannot import name check_build
- Root mean square of a function in python
- Installing opencv on Windows 10 with python 3.6 and anaconda 3.6
- What are the differences between numpy arrays and matrices? Which one should I use?
- ‘virtualenv’ is not recognized as an internal or external command, operable program or batch file
- Split string using a newline delimiter with Python
- No module named urllib3
- Replacing Pandas or Numpy Nan with a None to use with MysqlDB
- AttributeError: ‘tuple’ object has no attribute
- How to normalize a NumPy array to within a certain range?
- How to implement the ReLU function in Numpy
- How does cv2.boundingRect() function of OpenCV work?
- Sorting arrays in NumPy by column
- How to open html file?
- “Python version 2.7 required, which was not found in the registry” error when attempting to install netCDF4 on Windows 8
- Does python have header files like C/C++?
- numpy : calculate the derivative of the softmax function
- Python 2.7 mixing iteration and read methods would lose data
- Conditional indexing with Numpy ndarray
- What does an ‘r’ represent before a string in python?
- python numpy machine epsilon
- Python list index out of range on return value of split
- Python: OSError: [Errno 2] No such file or directory: ”