Python no module named serial

Python no module named serial

и у меня возник вопрос, когда я запускаю свой код Python.

Я установил Python 2.7 в Windows 7, бит 64. При компиляции моего кода я получил сообщение об ошибке "Без модуля с именем serial":

Я пробовал много способов взломать эту проблему, например, установленную Canopy для настройки виртуальной среды, убедитесь, что здесь есть "pip", не установлен Python v 3.x. Но все равно не получится.

Любые советы будут оценены.

Серийный номер не входит в состав Python. Это пакет, который вам потребуется установить отдельно.

Поскольку у вас установлен протокол, вы можете установить серийный номер из командной строки с помощью:

Или вы можете использовать установщик Windows из здесь. Похоже, что вы используете Python 3, поэтому нажмите на программу установки Python 3.

Затем вы должны иметь возможность импортировать серийный номер, как вы это делали раньше.

Сначала вы должны pip install pyserial .

У вас должна быть установлена библиотека pyserial. Вам не нужна последовательная библиотека. Поэтому, если последовательная библиотека предварительно установлена, удалите ее. Установите pyserial libray. Есть много способов установки: —

  1. pip install pyserial
  2. Загрузите zip из pyserial и сохраните извлеченную библиотеку в папке Lib >> site-packages Python.
  3. Загрузите колесо и установите колесо с помощью команды: pip install


Copy link Quote reply

eliyastein commented Aug 24, 2018

Any help would be much appreciated:

Python version: Python 2.7.10

ESP hardware in use: ESP8266

This comment has been minimized.

Copy link Quote reply

nixmeer commented Sep 3, 2018

I got the same issue. I am running on macOS 10.13.6. Esptool installed with the esp32 core and works fine when flashing the esp32 through Arduino IDE. When trying to flash tasmota firmware to an esp8266, I get the same error.

Читайте также:  Подключение миди клавиатуры к компьютеру

Python 2.7 and 3.7 installed.

This comment has been minimized.

Copy link Quote reply

projectgus commented Sep 20, 2018

Thanks for being patient while someone got back to you.

I think in both cases the version of pyserial which is installed is too old, and doesn’t have module.

You should be able to fix this by running pip install pyserial , or re-installing esptool with pip install esptool .

I’ll add a version check in the top of, so the error is clearer.

This comment has been minimized.

Copy link Quote reply

jssilva25 commented Sep 25, 2018 •

I’m getting the exact same error as the OP, same OS and py27.

I already did pip install pyserial and pip install esptool and I don’t think they are outdated:

EDIT: It works on the command line:

EDIT2: Never mind, I had installed esptool by git clone. Solved it by:

And now I have to call esptool using full path, otherwise esp-open-sdk gets in the way:
$ /opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/

Could you please help?

This comment has been minimized.

Copy link Quote reply

vinayprydotinfotech commented Mar 9, 2019

Same error

Traceback (most recent call last):
File "../tools/", line 26, in
import serial
ImportError: No module named serial
../Makefile:202: recipe for target ‘.output/eagle/debug/bin/’ failed
make[1]: *** [.output/eagle/debug/bin/] Error 1
make[1]: Leaving directory ‘/home/rydot/Downloads/nodemcu-firmware-2.2.1-master_20181207/app’
Makefile:292: recipe for target ‘.subdirs’ failed
make: *** [.subdirs] Error 2

platform pyhton 3.6 ,Ubuntu 16.04 LTS, 64bit
—pip3 install pyserial —user
—pip3 install serial —user
—pip3 install esptool —user
still not working
Any more advice ?

This comment has been minimized.

Copy link Quote reply

Читайте также:  Как поставить звезду в тексте

projectgus commented Mar 11, 2019

(For the record: NodeMCU ships quite an old version of esptool (v1.2-dev) plus some custom modifications.)

If you run /usr/bin/env python (which is the Python interpreter used by the script in NodeMCU), is it version 3.6? (Use control-d to exit.)

As it’s ubuntu, installing the native PySerial with sudo apt-get install python3-serial may help.

I have a script written in Python 3 with 3.3.5 installed, and I am getting this error from the terminal whenever I try to run it. I am using a Mac, OSX 10.7.5

I have already installed pyserial (using pip) for python 3. In order to do this, I first installed pip using:

I then installed pyserial with:

I run the script with Python Launcher and I get the error:

The error is at the line which says

I located pyserial in /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/site-packages . I am really stumped and have no clue why I am getting this error.

I tried the following in Terminal:

To me it looks like there isn’t an issue with the directory. Is that a fair assumption, since Python instantly looks through that directory when I try it with the command line, or is it different when I’m running a script?

I’m very new to all of this so any sort of help and patience would be hugely appreciated.

EDIT: For anyone else looking at this having a similar problem, I didn’t really fix it, but I worked around it by just running my program with eclipse using the PyDev plugin. If that’s an option for you, worked like a charm for me.

Ссылка на основную публикацию
Logitech deluxe 250 keyboard драйвер
Ниже показаны совместимые с ОС Windows 7 драйвера для Logitech Deluxe 250 USB Keyboard. Каждый драйвер клавиатуры Logitech Deluxe 250...
Adblock detector