0% found this document useful (0 votes)
106 views

Py Serial

The document provides instructions for installing Python and PySerial on Windows. It describes downloading and installing Python 2.7, adding the Python directory to the system PATH variable, and then downloading and installing PySerial using the setup.py install command in the command prompt.

Uploaded by

Nanda Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
106 views

Py Serial

The document provides instructions for installing Python and PySerial on Windows. It describes downloading and installing Python 2.7, adding the Python directory to the system PATH variable, and then downloading and installing PySerial using the setup.py install command in the command prompt.

Uploaded by

Nanda Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Install pySerial as follows:

Download pySerial from http://pypi.python.org/pypi/pyserial - click on pyserial-2.6.tar.gz to


download the library.

Run 7-Zip (Start -> All Programs -> 7-Zip -> 7-Zip File Manager).

Open the pyserial-2.6.tar.gz file with 7-Zip (File -> Open).

Double click the "dist" folder.

Single click on the "pyserial-2.6.tar" file and click the "Extract" button at the top of the window.
When asked where to put the file, specify c:\Python27\Lib\site-packages\pyserial-2.6

Exit from 7-Zip

Now that you have downloaded pySerial, install it:

Open a command window (Start -> All Programs -> Accessories -> Command Prompt) and type
into the command line: cd c:\Python27\Lib\site-packages\pyserial-2.6

Install pySerial by typing this command (including the path): c:\Python27\python.exe


setup.py install

Installing Python and PySerial


by Simon Monk

If you are using a Mac or Linux computer, the Python is already installed. If you are using
Windows, then you will need to install it. In either case, you will also need to install the PySerial
library to allow communication with the Arduino.

Install Python on Windows


To install Python on Windows, download the installer from http://www.python.org/getit/.

This project was built using Python 2.7.3. There are some reported problems with PySerial on
Windows, using Python 3, so stick to Python 2.
Once Python is installed, you will find a new Program Group on your Start menu. However, we
are going to make a change to Windows to allow you to use Python from the Command Prompt.
You will need this to be able to install PySerial.

We are going to add something to the PATH environment variable.


To do this, you need to go to the Windows Control panel and find the System Properties control.
Then click on the button labelled Environment Variables and in the window that pops-up
select Path in the bottom section (System Variables). Click Edit and then at the end of the
Variable Value without deleting any of the text already there, add the text: ;C:\Python27

Don't forget the ";" before the new bit!

To test that it worked okay, start a new Command Prompt (DOS Prompt) and enter the command
python. You should see something like this:
Install PySerial
Whatever your operating system, download the .tar.gz install package for PySerial 2.6 from
https://pypi.python.org/pypi/pyserial

This will give you a file called: pyserial-2.6.tar.gz

If you are using windows you need to uncompress this into a folder. Unfortunately, it is not a
normal zip file, so you may need to download a tool such as 7-zip (http://www.7-zip.org/).

If you are using a Mac or Linux computer, then open a Terminal session, 'cd' to wherever you
downloaded pyserial-2.6.tar.gz and then issue the following command to unpack the installation
folder.

Copy Code

1. $ tar -xzf pyserial-2.6.tar.gz

The rest of the procedure is the same whatever your operating system. Use you Comamnd
Prompt / Terminal session and cd into the pyserial-2.6 folder, then run the command:

Copy Code

1. sudo python setup.py install

You might also like