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:.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With