python> import seiral> ImportError: No module named serial

Operation check


CentOS 6.5
RaspberryPi2 + raspbian

151114a.py


import serial
import time
import socket

def main():
	print "hello"

if __name__ == '__main__':
	main()

When I try to run the above script on CentOS, it looks like this: No error occurs in RPi2. I don't remember if I installed the corresponding package on RPi2.

result


[toLearn]$ python 151114a.py 
Traceback (most recent call last):
  File "151114a.py", line 1, in <module>
    import serial
ImportError: No module named serial

SO describes how to handle it on Ubuntu.

# yum install python3-serial

I tried to execute, but it becomes No package python3-serial available.

Recommended Posts

python> import seiral> ImportError: No module named serial
Python module import
Today's python error: ModuleNotFoundError: No module named
Suddenly with Python PyInstaller No module named pyinstaller
Today's python error: ModuleNotFoundError: No module named
ModuleNotFoundError in Python: No module named story
Import Error in Python3: No module named'xxxxx'
python / netCDF / CentOS 6.8> ImportError: No module named netCDF4> sudo yum install netcdf4-python.x86_64
Solution for "Import Error: No module named requests"
python original module import
Import cv2 ModuleNotFoundError: No module named'cv2' in python3
[Python] ModuleNotFoundError: No module named'urlparse'
Resolve No module named tkinter
What to do if you get Swagger-codegen in python and Import Error: No module named
If you can't use Beautiful Soup 4 after updating to Python 3.5. ImportError: No module named bs4
Python error: ModuleNotFoundError: No module named'flask'
'lambda_function': No module named When'selenium' appears
[Solved] ImportError: No module named pyexpat and pyenv install is moss
When lambda-uploader says No module named xxxx.
Django / Apache / mod_wsgi: No module named importlib
[Python] Import the module one level higher
ModuleNotFoundError: No module named'***' when running Flask
Today's python error: ModuleNotFoundError: No module named'requests'
Module import and exception handling in python
Today's python error: ModuleNotFoundError: No module named'bs4'
Wall to put OpenCV 3.1.0 in raspberry pi 3 and run sample on python3: ImportError: No module named cv2 solution
ModuleNotFoundError: No module named'_bz2' error in pyenv Python
What to do if "amazon-linux-extras" → "No module named amazon_linux_extras"
About Python external module import <For super beginners>
Import python script
Python collections module
Summarize Python import
No module named What to do if you get'libs.resources'
NameError (wrong entry of Import) and ImportError (no _init_.py)