Python 安装pyserial Mac OS 10.10?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/31228787/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Install pyserial Mac OS 10.10?
提问by Daryl Croke
Attempting to communicate with Arduino serial ports using Python 2.7. Have downloaded pyserial 2.7 (unzipped and put folder pyserial folder in python application folder). Didn't work error message. "No module named pyserial".
尝试使用 Python 2.7 与 Arduino 串口通信。已下载 pyserial 2.7(解压缩并将文件夹 pyserial 文件夹放在 python 应用程序文件夹中)。没有工作错误信息。“没有名为 pyserial 的模块”。
Confused about how to install from terminal. Any assistance greatly appreciated.
对如何从终端安装感到困惑。非常感谢任何帮助。
回答by maziar navahan
try install with :
尝试安装:
sudo pip install pyserial
回答by Mike DeRosa
This was helpful for me: http://www.maclife.com/article/feature/25_terminal_tips_every_mac_user_should_know
这对我很有帮助:http: //www.maclife.com/article/feature/25_terminal_tips_every_mac_user_should_know
Specifically:
具体来说:
For commands that require the path to a file or folder, save yourself some typing by dragging and dropping the file or folder at the end of the command. The Terminal will automatically copy the dropped item's path and name.
对于需要文件或文件夹路径的命令,通过在命令末尾拖放文件或文件夹来节省一些输入。终端将自动复制放置项目的路径和名称。
So I clicked and dragged my pyserial fodler into terminal, hit enter, terminal said that it was a directory, then i typed "sudo install pyserial" and typed my password in and hit enter.
所以我点击并将我的 pyserial fodler 拖入终端,按回车,终端说这是一个目录,然后我输入“sudo install pyserial”并输入我的密码并按回车。
This was helpful when I couldn't figure out how to enter my password:
当我不知道如何输入密码时,这很有帮助: