2) If imutils is already installed, check the installation path.
Requirement already satisfied: imutils in /usr/local/lib/python3.5/dist-packages
3) When I ran python program, I ran into following error:
ImportError: No module named imutils.video
In my case, imutils was only installed under /usr/local/lib/python3.5/dist-packages path, once I copied this folder to /usr/local/lib/python2.7/dist-packages, it worked! Hope this is helpful.
Open Windows command prompt with administrator privileges (quick method: Press the Windows key. Type "cmd". Right-click on the suggested "Command Prompt" and select "Run as Administrator)
Navigate to the Python installation directory's Scripts folder using the "cd" (change directory) command. e.g. "cd C:\Program Files (x86)\PythonXX\Scripts"
This might be: C:\Users\\AppData\Local\Programs\Python\PythonXX\Scripts or C:\Program Files (x86)\PythonXX\Scripts (where XX represents the Python version number), depending on where it was installed. It may be easier to find the folder using Windows explorer, and then paste or type the address from the Explorer address bar into the command prompt.
Enter the following command: "pip install numpy".
You should see something similar to the following text appear as the package is downloaded and installed.
It should draw the following shape. The blue dots were drawn to show the starting and end points. They will be removed later.
We are going to draw the round corners with 90 degree arc of a circle in red color. The radius of the arc can be any number. Smaller radius generates smaller round corners. The following is the code snippet for drawing the round corner:
To finish the whole round rectangle, we just need to repeat the process one more time. The following is the complete code snippet with dots and colors removed:
turtle.up()
turtle.goto(-200,-150)
turtle.down()
for _ in range(2):
turtle.fd(400)
turtle.circle(100,90)
turtle.fd(200)
turtle.circle(100,90)
You may want to generalize this by creating a function that draws round rectangles with any corner size. The following is the complete code:
The turtle's first appearance should be at the top left of the window.
Python turtle, change start position:
import turtle
a = turtle.Turtle()#instantiate a new turtle object called 'a'
a.hideturtle()#make the turtle invisible
a.penup()#don't draw when turtle moves
a.goto(-200,-200)#move the turtle to a location
a.showturtle()#make the turtle visible
a.pendown()#draw when the turtle moves
a.goto(50,50)#move the turtle to a new location
The turtle becomes visible and starts drawing at position -200, -200 and goes to 50, 50.