gpt4 book ai didi

Python导入错误: No module named serial

转载 作者:太空宇宙 更新时间:2023-11-03 17:51:43 24 4
gpt4 key购买 nike

我已在 DELL LATITUDE E4300 64 位的 Ubuntu 12.4 上安装了 Python 2.7.5 并运行:

sudo pip install pyserial

尽管如此,运行时:

sudo python main.py 

我收到以下错误消息:

Traceback (most recent call last):
File "main.py", line 4, in <module>
from mySerial import *
File "/home/oscar/ath10k/tools/sanity_test/src/mySerial.py", line 6, in <module>
import serial
ImportError: No module named serial

我查看了其他帖子,但没有一个能帮助我解决这个问题。我不知道还能做什么我也跑了:

sudo -H pip install pyserial

sudo pip install pyserial --upgrade

任何帮助将不胜感激。

亲切的问候。

奥斯卡。

最佳答案

在默认使用 python 2.7 的 ubuntu 14.4 上,我借助以下命令安装了 python3 的 pyserial(我的 IDE 实际使用的是它):

 sudo apt-get install python3-serial

关于Python导入错误: No module named serial,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29012189/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com