Как установить pyserial на windows
Перейти к содержимому

Как установить pyserial на windows

  • автор:

Arduino Lesson 17. Email Sending Movement Detector

Arduino Lesson 17. Email Sending Movement Detector

You will be redirected back to this guide once you sign in, and can then subscribe to this guide.

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.

learn_arduino_pyserial_install_dos_1.png

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.

learn_arduino_Python_inst_win_setting_path.png

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:

learn_arduino_python_from_dos.png

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.

$ tar -xzf pyserial-2.6.tar.gz
$ 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:

sudo python setup.py install
sudo python setup.py install

learn_arduino_pyserial_install_dos_1.png

This guide was first published on Feb 28, 2013. It was last updated on Feb 28, 2013.

This page (Installing Python and PySerial) was last updated on Feb 28, 2013.

Text editor powered by tinymce.

installing and using pyserial in python 3.4 windows 8.1

I want to use pyserial but I do not know what I am doing wrong I have installed python 3.4.2 from this link www-python-org-downloads-release-python-342- the one that says «Windows x86-64 MSI installer» and I got this archive «python-3.4.2.amd64.msi» because my operating system is 64 bit during the installation I have selected «add python.exe to path» (will be installed on local hard drive), and all the other ones I went to the pyserial website http://pyserial.sourceforge.net/pyserial.html#installation which say «Download the archive from http://pypi.python.org/pypi/pyserial. Unpack the archive, enter the pyserial-x.y directory and run:» and sent me to this link http-pypi-python-org-pypi-pyserial I have donwloaded from this link, these three archives pyserial-2.7.tar.gz, pyserial-2.7.win32.exe pyserial-2.7.win32_py3k.exe I have tried to run the .exe one but they say «No python installation found in the registry», which I dont know why then I unpack the .gz file with Winrar enter into the folder and try to run «pyserial-x.y» but there is nothing like that in this folder in this folder I can find

documentation (folder) examples serial test CHANGES.txt LICENSE.txt MANIFEST.in PKG-INFO README.txt setup.py 

I tried to run this «setup.py» but for a second a black window appears

detected Python 3, using 2to3 C;\Python34\lib\distutils\dist.py:260: UserWarning: Unknow distribution option: use_2to3 warning.warn(msg) usage: setup.py [global_opts] [cmd1_opts] [cmd2 [cmd2_opts] . ] or: setup.py --help [cmd1 cmd2 . ] or: setup.py --help commands or: setup.py cmd --help error: no commands supplied 

and then disappears I went to the command prompt and wrote «python3 setup.py install» or python setup.py install but it says Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\Users\me>python3 setup.py install ‘python3’ is not recognized as an internal or external command operable program or batch file. so I cant do that either then in command prompt I chancge the directory with «cd C:\Users\me\Downloads\pyserial-2.7» which is the place where the folder .gz is then «python setup.py install» and «python3 setup.py install» but they do not work there is the code and at the end it says

C:\Users\me\Downloads\pyserial-2.7>python setup.py install Detected Python 3, using 2to3 C:\Python34\lib\distutils\dist.py:260: UserWarning: Unknown distribution option: 'use_2to3' warnings.warn(msg) running install running build running build_py running build_scripts running install_lib running install_scripts running install_egg_info Removing C:\Python34\Lib\site-packages\pyserial-2.7-py3.4.egg-info Writing C:\Python34\Lib\site-packages\pyserial-2.7-py3.4.egg-info C:\Users\me\Downloads\pyserial-2.7> 

then I try to write in the command prompt «python» then «import serial» but still it does not work THEN i DO NOT KNOW WHAT TO DO could somebody help me

pyserial 3.5

История выпусков Уведомления о выпусках | Лента RSS

Эта версия

3.5b0 предварительный выпуск

Загрузка файлов

Загрузите файл для вашей платформы. Если вы не уверены, какой выбрать, узнайте больше об установке пакетов.

Source Distribution

Uploaded 23 нояб. 2020 г. source

Built Distribution

Uploaded 23 нояб. 2020 г. py2 py3

Хеши для pyserial-3.5.tar.gz

Хеши для pyserial-3.5.tar.gz

Алгоритм Хеш-дайджест
SHA256 3c77e014170dfffbd816e6ffc205e9842efb10be9f58ec16d3e8675b4925cddb Копировать
MD5 1cf25a76da59b530dbfc2cf99392dc83 Копировать
BLAKE2b-256 1e7dae3f0a63f41e4d2f6cb66a5b57197850f919f59e558159a4dd3a818f5082 Копировать

Хеши для pyserial-3.5-py2.py3-none-any.whl

Хеши для pyserial-3.5-py2.py3-none-any.whl

Алгоритм Хеш-дайджест
SHA256 c4451db6ba391ca6ca299fb3ec7bae67a5c55dde170964c7a14ceefec02f2cf0 Копировать
MD5 b6b182ebaf20199e9788214cae349df4 Копировать
BLAKE2b-256 07bc587a445451b253b285629263eb51c2d8e9bcea4fc97826266d186f96f558 Копировать

Помощь

О PyPI

Внесение вклада в PyPI

Использование PyPI

Разработано и поддерживается сообществом Python’а для сообщества Python’а.
Пожертвуйте сегодня!

PyPI», «Python Package Index» и логотипы блоков являются зарегистрированными товарными знаками Python Software Foundation.

Устанавливаем python-пакеты с помощью pip

Python 3 логотип

pip — это система управления пакетами, которая используется для установки и управления программными пакетами, написанными на Python.

Установка pip

Прежде чем с помощью pip устанавливать python-пакеты, нужно сначала установить сам pip.

Python 3.4+

Начиная с Python версии 3.4, pip поставляется вместе с интерпретатором python.

Python

  • Загрузить get-pip.py (обязательно сохранив с расширением .py).
  • Запустить этот файл (могут потребоваться права администратора).

Есть ещё один способ (для Windows). Возможно, он является более предпочтительным:

  • Установить setuptools http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools
  • Установить pip http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip

Начало работы

Попробуем с помощью pip установить какой-нибудь пакет, например, numpy:

sudo pip3 install numpy
pip3 install numpy

Может не сработать, написав: «python» не является внутренней или внешней командой, исполняемой программой или пакетным файлом (такого, скорее всего, не должно быть при установке pip вторым способом, но проверить не на чем).

Тогда нужно обращаться напрямую:

Либо добавлять папку C:\Python34\Tools\Scripts\ в PATH вручную (самому проверить не на чем, можете посмотреть на stackoverflow. У кого получится — напишите в комментарии).

Что ещё умеет делать pip

Пробежимся по основным командам pip:

pip help — помощь по доступным командам.

pip install package_name — установка пакета(ов).

pip uninstall package_name — удаление пакета(ов).

pip list — список установленных пакетов.

pip show package_name — показывает информацию об установленном пакете.

pip search — поиск пакетов по имени.

pip —proxy user:passwd@proxy.server:port — использование с прокси.

pip install -U — обновление пакета(ов).

pip install —force-reinstall — при обновлении, переустановить пакет, даже если он последней версии.

Для вставки кода на Python в комментарий заключайте его в теги

  • Модуль csv - чтение и запись CSV файлов
  • Создаём сайт на Django, используя хорошие практики. Часть 1: создаём проект
  • Онлайн-обучение Python: сравнение популярных программ
  • Книги о Python
  • GUI (графический интерфейс пользователя)
  • Курсы Python
  • Модули
  • Новости мира Python
  • NumPy
  • Обработка данных
  • Основы программирования
  • Примеры программ
  • Типы данных в Python
  • Видео
  • Python для Web
  • Работа для Python-программистов
  • Сделай свой вклад в развитие сайта!
  • Самоучитель Python
  • Карта сайта
  • Отзывы на книги по Python
  • Реклама на сайте

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *