简体   繁体   English

由于断言错误,请不要安装Pyserial

[英]Pip not installing Pyserial due to Assertion Error

I'm trying to read the serial output from a device using Pyserial . 我正在尝试使用Pyserial读取设备的串行输出。 However, the module is not being recognized and pip install pyserial keeps giving me an assertion error. 但是,模块未被识别,并且pip install pyserial一直给我一个断言错误。

I've tried adding the pyserial folder to the path and moving it into the python modules folder. 我已经尝试将pyserial文件夹添加到路径并将其移动到python模块文件夹中。

import serial
ImportError: No module named serial

pip install pyserial
AssertionError: c:\python27\lib\site-packages\jdcal-1.3-py2.7.egg/EGG-INFO/PKG-INFO is not a subpath of c:\python27\lib\site-packages\jdcal-1.3-py2.7.egg\

I expected it to install but it is giving me this error regarding an unrelated file. 我希望它能安装,但是它给了我一个关于不相关文件的错误。

Perhaps try 也许试试吧

pip3 install pyserial

or 要么

sudo easy_install pyserial

or as per the docs 或者按照文档

python -m pip install pyserial

https://pyserial.readthedocs.io/en/latest/pyserial.html#from-pypi https://pyserial.readthedocs.io/en/latest/pyserial.html#from-pypi

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM