Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named imutils.perspective after pip installing

I am trying to follow this tutorial which requires imtools. It looks like I have the package installed, but the Python compiler cannot find it. What's going on here?

Tutorial: http://www.pyimagesearch.com/2016/10/03/bubble-sheet-multiple-choice-scanner-and-test-grader-using-omr-python-and-opencv/

~/py:. cat test_grader.py
from imutils.perspective import four_point_transform~

~/py:. python test_grader.py
Traceback (most recent call last):
  File "test_grader.py", line 1, in <module>
    from imutils.perspective import four_point_transform
ImportError: No module named imutils.perspective

~/py:pip install imtools
Requirement already satisfied: imtools in /usr/local/lib/python2.7/site-packages
Requirement already satisfied: matplotlib in /usr/local/lib/python2.7/site-packages (from imtools)
Requirement already satisfied: pyyaml in /usr/local/lib/python2.7/site-packages (from imtools)
Requirement already satisfied: numpy in /usr/local/lib/python2.7/site-packages (from imtools)
Requirement already satisfied: scipy in /usr/local/lib/python2.7/site-packages (from imtools)
Requirement already satisfied: python-dateutil in /usr/local/lib/python2.7/site-packages (from matplotlib->imtools)
Requirement already satisfied: pyparsing!=2.0.0,!=2.0.4,>=1.5.6 in /usr/local/lib/python2.7/site-packages (from matplotlib->imtools)
Requirement already satisfied: cycler in /usr/local/lib/python2.7/site-packages (from matplotlib->imtools)
Requirement already satisfied: pytz in /usr/local/lib/python2.7/site-packages (from matplotlib->imtools)
Requirement already satisfied: six>=1.5 in /usr/local/lib/python2.7/site-packages (from python-dateutil->matplotlib->imtools)
~/py:.
like image 770
quantumpotato Avatar asked Nov 26 '16 18:11

quantumpotato


People also ask

How do I add Imutils to Pycharm?

When you go into the package manager, there is an Anaconda icon in the form of a green circle on the right-hand side. This specifies whether or not to use the Conda Manager for packages. Click on the circle to de-select this option and you should be able to search for imutils in the new list.

What is import Imutils in Python?

imutils 0.5. 4 A series of convenience functions to make basic image processing functions such as translation, rotation, resizing, skeletonization, displaying Matplotlib images, sorting contours, detecting edges, and much more easier with OpenCV and both Python 2.7 and Python 3.

How install Imutils Linux?

You need not run pip as root. 7/site-packages . Other readers should check the output of python -m site to find the user site directory and see if it's enabled. Show activity on this post. Try this instead: sudo pip install imutils It might be an issue of permission denied.


1 Answers

Seems like you just installed wrong package. The tutorial says you need imutils but you installed imtools instead. Try to install imutils:

pip install --upgrade imutils
like image 129
neverwalkaloner Avatar answered Sep 29 '22 07:09

neverwalkaloner