导入序列在python中不起作用(import serial doesnot work in python)

编程入门 行业动态 更新时间:2024-10-14 22:15:33
导入序列在python中不起作用(import serial doesnot work in python)

我安装了pyserial 2.5,我的python版本是3.2.1,当我尝试导入串口时显示选项但是当我运行相同的程序时出错了ImportError: No module named serial和我的编辑器是aptana studio有没有更好的解决方案使用python或PHP将十六进制数据发送到串行端口

I had installed pyserial 2.5 and my python version is 3.2.1 when I try to import serial it show the option but when I run the same program got errorImportError: No module named serial and my editor is aptana studio is there any better solution to send hex data to serial port by using either python or PHP

最满意答案

我怀疑你已经安装了Pyserial,直接将其解压缩到你的site-packages文件夹。

如果您改为安装它

python3 setup.py install

setup.py将转换文件以与Python 3兼容。

I suspect you have installed Pyserial by unzipping it directly to your site-packages folder.

If you instead install it by

python3 setup.py install

setup.py will convert the files to be compatible with Python 3.

更多推荐

本文发布于:2023-08-02 03:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1368730.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:序列   中不   python   import   doesnot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!