Python learning resources

Learn Python
Developing Environment
  • Idle - Python default developing environment. Upon installing python, it installed also Idle by default.
  • Visual studio 2017 (I prefer the community edition).
  • PyCharm - Most popular IDE for Python.
Windows - Addons Python 2.x
  • TK GUI for Python - Graphical User interface
  • Numpy - Run from command prompt "pip install numpy"
  • Matplotlib - Run from command prompt "pip install matplotlib"
  • OpenCV on windows for Python
    • Option 1
      • Run from command prompt "pip install numpy"
        • Test Numpy with the following python command: print numpy.version.version
      • Download OpenCV and install
      • Goto installed openCV: opencv/build/python/2.7 folder.
      • Copy cv2.pyd to C:/Python27/lib/site-packeges.
      • Open Python IDLE and type following codes in Python terminal.
        • import cv2
        • print cv2.__version__
      • FFmpeg
        • Inside OpenCV directory: opencv\build\bin\opencv_ffmpeg320.dll copy to c:\python27 directory.
    • Option 2
    • Example Code:
      • Run example program to check it works, this program extracts frames from a video file:

        import numpy
        import cv2

        print numpy.version.version
        print cv2.__version__

        vidcap = cv2.VideoCapture("PigeonVideo.mp4")
        success,image = vidcap.read()
        count = 0
        success = True
        while success:
            success,image = vidcap.read()
            print 'Read a new frame: ', success
            cv2.imwrite("frame%d.jpg" % count, image)
            count += 1

Windows - Addons Python 3.5.x
  • Note: For every install, open command prompt as ADMINISTRATOR only.
  • Numpy install: pip3 install numpy
  • Tensorflow - An open-source software library for Machine Intelligence