…little BITS of our lives.

Posts tagged ‘pyserial’

Installing pyserial on Windows 7 with Python3.2

Well it is time for another easy tutorial on how to install something with python on Windows and that something is pyserial. I am assuming if you are reading this, you already know what pyserial is, but are just having trouble getting it installed with python.

Let me just talk about what problem most people face while performing the install. They get an error like “no python installation found in the registry” and then the installer quits.

To resolve this error, first you need to check whether your windows machine can find the python executable, by which I mean the following:

1. Open up the command prompt and type python.

If you get an error like “python is not recognized as an internal command…bla bla bla…” it means that your     system can not find where your python executable is. We need to solve this issue first and for that we need to set our ‘environment variables‘.

2. So go to Start menu. Right click on computer and select properties. Then go to advanced system properties and select environment variables. Look for the variable ‘Path’, select it and click edit. Python 3.2 is installed in the location ‘C:\Python32‘, so just add this to the path variable.

3. Now close all windows and RESTART your computer. If you don’t restart it, then the changes won’t take place.

4. Now after restarting, to check all if all went well, open the command prompt and then type ‘python‘. What you should get is following:

This prompt tells us that the system can find python executable now. Yay!!! Now we can focus on installing pyserial.

So the next step involves downloading the  file  pyserial-2.6.tar.gz from the pyserial website, extract it and then copy the extracted folder to C:\Python32\Lib\site-packages. Once you are done with that, move to the folder which contains the file ‘setup.py’, using command prompt and enter:

python setup.py install

That’s it!

Have fun with pyserial, and if u have any problems pls post. I will be happy to help! 😀