Python with Arduino LESSON 6: Installing PIP on Windows

In this series of lessons you have learned to send data from Arduino to Python, and then do some pretty cool things in Python. We have created little virtual worlds, and have done neat dynamic graphics. Unfortunately not all Python libraries are as easy to install as vPython and pySerial. Some are next to impossible to install. The good news is that there is a free program called PIP that will install just about any Python library very easily. We need to pause and install PIP. Many of the future lessons will require you to have PIP installed on your machine. Please follow along with me on the video, which shows you how to install PIP on your windows machine. These links will be useful. You can download pip at this link:

https://pip.pypa.io/en/latest/installing.html

Go to the section on PIP install as seen here:

Install PIP

Right mouse click on get-pip.py and download to your desktop. You will then want to run the program in python. We show you how to do this in the video above. Then, you need to edit your system path file by going to the control panel, select system, select advanced settings, and under environmental parameters select the path. Update your path file to show your system where your python folder is and where your python script folder is. If you are unsure of this, watch the video where I show you exactly how to do it. If you are adept with computers, you can just do it from this description. Add the two elements to your path. Adjust the parameters to reflect where your python installation is and where your python script folder is. For me, these are the two things added to my path:

C:\Python27

and

C:\Python27\Scripts

If you do not know exactly what I am saying, then watch the video for more detail.

Once you have these in your system path, you can test your PIP as follows.

Open a CMD box.

Type:

pip install -U pip

This asks pip to update itself. You should see it come up and indicate it is either up to date or is updating. This will tell you that you have the PIP installed correctly.

Your life with Python will now be much easier because your system now knows the path to both your Python program and your PIP installer.

8 thoughts on “Python with Arduino LESSON 6: Installing PIP on Windows”

  1. Just started following these tutorials. As of today, Jan 2015, the current version of Python is 2.7.9, and it includes PIP. So if you install it, you won’t need to do a separate install of PIP. I still went ahead and added Python to the path.

    I’ve been looking for projects related to tilt sensors and ran across the Inertial Measurement post. This then lead me to looking at the tutorials. I’ve done a bit of Arduino, but always as standalone projects. I really like connecting it to Python.

    Thanks for the interesting and informative tutorials.

  2. At the very end of the video, when editing the Paths I think you missed the backslash before “Scripts.” That threw me for a loop for a while. After inserting that it worked great. I would never have gotten that far without your video
    Thanks, for all the other Arduino and Python tutorials. I love your insistence about documenting what you do.

  3. Paul,

    Again great video and tutorials. I want to do as much as possible on my RPi2. Installation is much easier for all the software you need to plot with.
    pyserial and numpy were already installed on Python 2 in the RPi2. I checked the code, and pyserial works just fine on capturing the serial output of the Arduino on your 1 Mississsippi, . . . etc. program.

    Go here to install the matplotlib, pip, and drawnow. Also numpy if you do not have.

    [LINKS DELETED]

    Install numpy, matplotlib and drawnow for Python 2:
    $ sudo apt-get install python-numpy
    $ sudo apt-get install python-matplotlib
    $ sudo apt-get install python-pip
    $ sudo pip install drawnow

    This worked like a charm, and you can check the installs by typing in the python shell
    >>> import numpy
    >>> import matplotlib
    >>> import drawnow

    If you get error message like this, you have to install it.
    ImportError: No module named numpy
    ImportError: No module named matplotlob
    ImportError: No module named drawnow

    If no error, module is installed and available.
    Can also check installs with commands
    sudo apt-cache policy python-pip
    or
    sudo apt-cache policy python-matplotlib

    1. I am new to both Python and PIP. I have Python version 2.7.11, with PIP included. I have problems installing Drawnow, or any other extension. I ran VIDLE like so: import PIP -> run. This took me to Python shell, where I entered : install Drawnow. This does not work. What have I missed? The downloaded Drawnow file is on the desktop, as downloaded.

  4. For any of the Mac users that read my comment in Lesson 2, and followed one of the Python installation guides using Homebrew, here’s good news: PIP is already installed! In fact, I used pip to install PySerial for Lesson 2.

  5. Thank you very much sir Paul for your tutorials. I am able to use Phyton integrated with Arduino smoothly and use different “hard to install” libraries in Phyton with the help of your videos. Thanks you very much sir. We are working on our thesis project on plotting GPS data to a map, and with phyton at my disposal, matplotlib library the PIP and other libraries(from your tutorials), i know Our team can make it to our deadline. Godbless you.

  6. At first I was a little scared of Linux , but now I will never use windows/dos again. Thanks Paul for all the Linux lessons. Much easier to apt-get install etc and it puts it in all the right places for you. Linux inventor wherever you are…well done mate.
    Thanks Richard Franklin for the raspberry pi links, all installed and can carry on with Paul’s great lessons.

Comments are closed.