Python Forum
OpenCV installation issue
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
OpenCV installation issue
#1
Hi guys I have downloaded python 3.6 install it:works fine Cool . After I have install Numpy, Matplotlib. Also I have downloaded opencv.whl.
I am trying to install it by
pip install opencv_python-3.3.0-cp35-cp35m-win_amd64.whl
but I am always getting following error.
Quote:Fatal error in launcher: Unable to create process using '"'
Wall
After this I tried to download opencv-3.3.0-vc14.exe. I did everything by instruction. Copy cv2 file in site-package directory but everything unsuccessful. Huh
Somebody help me. How Can I install openCV in python Pray
P.S it already works for java.
Reply
#2
Hi,

Have you tried installing it/using it  as OpenCV rather then opencv?

Bass

"The good thing about standards is that you have so many to choose from" Andy S. Tanenbaum
Reply
#3
(Aug-17-2017, 12:05 PM)Bass Wrote: Hi,

Have you tried installing it/using it  as OpenCV rather then opencv?

Bass

Please clarify your question I don't understand what you mean.
Reply
#4
Hi,

Python can be case sensitive.

So if you install a package/library as DUMMY then you will need to import it into your script as DUMMY i.e. the libraries can be case sensitive.

If however the library is called Dummy then you will need to refer to it as Dummy and *not* DUMMY or dummy.

In your post you referred to the library as OpenCV but in your pip command it was opencv_python.

So you *could* have two seperate libraries, one called DUMMY_ONE and one called Dummy_One. These would be treated as two different libraries.

Does this make more sense?

Hi,

Further to earlier reply....

Have you seen snippsats link to OpenCV help this came from this thread  posted on the 15th Aug 2017. It is not a package that I use.... But hopefully may help.

Good Luck

Bass

"The good thing about standards is that you have so many to choose from" Andy S. Tanenbaum
Reply
#5
(Aug-17-2017, 11:58 AM)NOOBscripts Wrote: Hi guys I have downloaded python 3.6 install it:works fine
But you try installing openCV wheel for Python 3.5.
cp35 means that's it for Python 3.5,win_amd64 means that Python version is 64-bit.

Here a demo om me using it,i have Python 3.6 which is 32-bit.
I use virtual environment,but it's the same way to install to OS version of Python.
# Check pip
(py_in) E:\1\py_in\dist
λ pip -V
pip 9.0.1 from e:\1\py_in\lib\site-packages (python 3.6)

# Check if Python is 32 or 64 bit
(py_in) E:\1\py_in\dist
λ python
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

# Install with correct wheel for 3.6 and 32-bit.
(py_in) E:\1\py_in
λ pip install opencv_contrib_python-3.3.0.9-cp36-cp36m-win32.whl
Processing e:\1\py_in\opencv_contrib_python-3.3.0.9-cp36-cp36m-win32.whl
Collecting numpy>=1.11.3 (from opencv-contrib-python==3.3.0.9)
  Using cached numpy-1.13.1-cp36-none-win32.whl
Installing collected packages: numpy, opencv-contrib-python
Successfully installed numpy-1.13.1 opencv-contrib-python-3.3.0.9

(py_in) E:\1\py_in
λ
Reply
#6
Ok guys thanks for your response. I eventually have installed opencv module from
Python official site
I couldn't install it because my python was 32 bit and I try to install 64 bit.(Dummy fault in know Big Grin )
After installation when i try to import library I get this.
C:\>python -m pip install opencv_contrib_python-3.3.0.9-cp36-cp36m-win32.whl
Processing c:\opencv_contrib_python-3.3.0.9-cp36-cp36m-win32.whl
Requirement already satisfied: numpy>=1.11.3 in c:\python36-32\lib\site-packages (from opencv-contrib-python==3.3.0.9)
Installing collected packages: opencv-contrib-python
Successfully installed opencv-contrib-python-3.3.0.9
C:\>python
Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:14:34) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed: %1 is not a valid Win32 application.
Any idea how to fix it?
Reply
#7
(Aug-17-2017, 01:33 PM)NOOBscripts Wrote: ImportError: DLL load failed: %1 is not a valid Win32 application.
This means that there problem with 32-64 bit,for you it's mean that's 64-bit when it should be 32-bit.
You most try to uninstall the wrong version you did installed first.
Quote:Requirement already satisfied: numpy>=1.11.3
Here you see that is already installed,this can be 64-bit version of numpy.
pip uninstall wheel-version
Reply
#8
Guys everything is done. I just remove python 3.6 and install 2.7 it with libs, now everything works correctly.
Thanks for reply guys.
Reply
#9
(Aug-17-2017, 02:56 PM)NOOBscripts Wrote: Guys everything is done. I just remove python 3.6 and install 2.7 it with libs, now everything works correctly. Thanks for reply guys.
Okay good that work,but you should really use 3.6 not 2.7 Wink
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020