cant install cv2 in python 2.7 - python-2.7

I am using a book called Hello World to learn Python. I used the installer at "http://helloworldbookblog.com/downloads/", which installs python 2.7, among other things. The lesson I'm on now has a sample program that I'm supposed to look at, but unfortunately, when I try to run it, it throws this error
no module named cv2
I've tried for days, but I just can't seem to figure out how to install cv2. Is there a simple way that I'm missing?
For some reason, the installer didn't include pip, and I can't figure out how to install that either.

Install OpenCV (https://sourceforge.net/projects/opencvlibrary/) to access the module cv2. If python is correctly installed, https://www.liquidweb.com/kb/install-pip-windows/ gives you steps to install pip. Hope this helped

Related

Sublime text 2 can not find any python module

I am leaning programming now and get stuck in the very beginning.
I have sublime text 2 installed on my Mac, and I type some python code in and it runs. However, when I start to import module like pandas/matplotlib, it can not find those modules. Certainly I have used pip to install them.
So what is the solution please?
Does Your code work with those modules when You use a different editor?
If it doesn't, Check if the modules You need are indeed installed. You can do this either by using the python prompt:
python
>>> help("modules")
>>> exit()
or using pip:
pip freeze
(sorry for posting this as an answer, but I'm currently not able to post comments)

scipy installation in windows 10 using pip

From the past two days, I've been trying to install scipy from the wheel file available from http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy in my windows laptop 64 bit built and running Python 2.7.3. I tried running pip install scipy in the command window, it didn't work and the following error popped up in command prompt
and
I also tried typing
pip install scipy-version.whl
That didn't work too! and the same error popped up. I even updated my pip.
I read in some comments that pip doesn't work well for scipy installation. If so, what alternatives can you suggest? If not can you tell me the way to install using wheel scripts?
There are some issue while installing scipy using pip, please try using Anaconda python version which comes with all the libraries you can ever need instead of your default python.
Still if you want to use the default python refer here, as already answered here.

How to install GDAL/scipy using cmd in window?

I downloaded scipy-0.17.0-cp27-none-win_amd64.whl and GDAL-1.11.4-cp27-none-win_amd64.whl from gohlke in C:\Python27\Scripts
To install I used
pip install scipy-0.17.0-cp27-none-win_amd64.whl
pip install GDAL-1.11.4-cp27-none-win_amd64.whl
It says the installation is complete but when I import the libraries as
import scipy
import gdal
it shows error as
No module named gdal
No module named gdal
However, I installed the matplotlib, numpy in the very same way and they are working absolutely fine.
I solved this problem eventually to found the mistake in my approach.
This problem can occur with anyone using ArcGIS in one's system.
ArcGIS comes with it's default Python package and if one installs python separately, each time the new libraries gets installed in the newer Python installation not in ArcGIS.
Therefore, the pyhton IDLE which one uses need to be from another Python installation.
Here in my case, ArcGIS has Python 2.6 and I have made an separate installation using Python 2.7.11.
All the libraries were getting installed in right place but I was opening the wrong IDLE to write scripts hence getting error.

Error "from scipy.linalg import _fblas importerror: DLL load failed"

I found a code on internet which implement a paper "Effective 3D Action
Recognition Using EigenJoints" code. They implement in Python so I tried to install Python 2.7.9 and numpy, scipy, scikit-learn. All these libraries installed successfully. In the cmd when i tried to run python eigen.py it gives me this error.
Please anyone download this code and run it by yourself or help me to solve this error.
You have to do 2 steps:
download anaconda according to your system and specifications.
Make sure that Anaconda is installed on python version installed on your system. For example, if you have python 3.4, and anaconda in installled on 2.7, then you should remove python 3.4.
Afterwards, the code will run smoothly and all libraries will be well defined. I have made the same ;) Please, let me know if you face new problems.

I can't install numpy and scipy with python

Can anyone tell me how can i setup a python working environment with numpy and scipy?
I have succesfully downloaded python but i can't install numpy,it gives me an error "unable to find vcvarsall.bat"
You can install Enthought Canopy, which is an easy way to get python with lots of useful packages (including numpy and scipy) built in.
Similar to jh314's answer, there is also Anaconda.
Download the executable installers from Christoph Gohlke's Python Extension Packages for Windows repository. Numpy is here and Scipy is here.