Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pyserial for Python 2.7.2

I'm new to Python. According to the internets I was looking for the module pyserial after receiving this error:

ImportError: No module named serial

I first tried to install pywin32, it went well. But it seems not to contain pyserial. :-(

Then I found a single module installer for pyserial, I was not able to install it, it says it did not found the path to python in the registry. :-(

After that I found this module on python.org, but I don't know what to do, it does not come with an installer. :-(

How can I add pyserial to Python (64) 2.7 on Windows 7 64?

like image 384
powtac Avatar asked Dec 13 '11 14:12

powtac


3 Answers

understood that this question is for Windows, but since it comes up first in a Google search let me add an alternative (to pip) for Debian:

sudo apt-get install python-serial

like image 169
jcomeau_ictx Avatar answered Oct 26 '22 20:10

jcomeau_ictx


You could try it with pip. (Here a question/answer about installing it)

Then type in your shell:

pip install pyserial

Solution:
The installation of pip on Windows 7 64 is a little tricky: I added my Python and Python/Scripts path to the PATH env.
Then I opened PythonWin as Administrator, ran ez_setup.py from http://pypi.python.org/pypi/setuptools#downloads with PythonWin. And then I downloaded pip unpacked it and as Administrator I ran python setup.py install on the windows shell and after that pip install pyserial.

like image 33
Constantinius Avatar answered Oct 26 '22 19:10

Constantinius


From http://www.instructables.com/id/The-Arduino-Internet-Gizmo/step19/Installing-the-software/

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

like image 36
Diana Avatar answered Oct 26 '22 20:10

Diana