Python ImportError:没有名为串行的模块

Python ImportError:没有名为串行的模块

问题描述:

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

I have installed Python 2.7.5 on Ubuntu 12.4 on a DELL LATITUDE E4300 64 bit and ran:

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

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

I looked on other posts but none of them helped me to solve this problem. I don't know what else to do I also ran:

sudo -H pip install pyserial

sudo pip install pyserial --upgrade

任何帮助将不胜感激.

亲切的问候.

奥斯卡.

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

On my ubuntu 14.4 with python 2.7 as default, I installed pyserial for python3 (which my IDE is using actually) with the help of following command:

 sudo apt-get install python3-serial