Link to install instructions was reviewed.
尝试通过pip安装失败:
C:\用户\使用者>蟒 win32上的Python 3.5.1(v3.5.1:37a07cee5969,2015年12月6日,01:54:25)[MSC v.1900 64位(AMD64)] 输入“帮助”,“版权”,“信用”或“许可”以获取更多信息。
pip install pyserial 文件“”,第1行 pip install pyserial ^ SyntaxError:语法无效
不确定为什么会出现错误(也许此模式仅适用于LINUX / OSX?)。非常好奇。
从其他帖子中可以肯定的是,Win-32位pyserial安装程序无法在Win64上运行。理想情况下,在Win64上成功安装pyserial的人可以权衡并提供链接/ CLI安装说明。花了几个小时谷歌搜索,但尚未解决此安装。
答案 0 :(得分:1)
尝试从Windows的命令行安装PySerial。只需确保'pip'在你的路径中。
C:\Users\User>pip install pyserial
顺便说一句,较新版本的PySerial有一些可能会影响你的错误(他们对我这么做)。如果发生这种情况,只需安装早期版本的PySerial即可。我发现对我来说2.7工作得很好。
C:\Users\User>pip install pyserial=2.7 -I
标志-I告诉pip忽略其他版本并安装(或重新安装)已定义的版本。
答案 1 :(得分:0)
我很好奇有多少读者成功使用了下面的安装过程。如果您的成功请通过投票表明此回复。如果您没有成功安装程序,请不要投票。
1)下载并解压缩(WinRAR):pyserial3.0.1.gz到C:\ Apps \ pyserial
2)在DOS CLI:cd C:\ Apps \ pyserial
3)在DOS CLI:python setup.py install
C:\ Users \ User> cd \ Apps \ pyserial
C:\ Apps \ pyserial> python setup.py install
运行安装运行bdist_egg运行egg_info写入顶级 写入dependency_links的pyserial.egg-info \ top_level.txt的名称 pyserial.egg-info \ dependency_links.txt写作 pyserial.egg-info \ PKG-INFO读取清单文件 ' pyserial.egg-信息\ SOURCES.txt'阅读清单模板 ' MANIFEST.in'写清单文件' pyserial.egg-info \ SOURCES.txt' 安装库代码来构建\ bdist.win-amd64 \ egg运行 install_lib运行build_py创建构建创建build \ lib 创建build \ lib \ serial复制serial \ aio.py - >建立\ LIB \串口 复制serial \ rfc2217.py - > build \ lib \ serial复制serial \ rs485.py - > build \ lib \ serial复制serial \ serialcli.py - > build \ lib \ serial复制serial \ serialjava.py - > build \ lib \ serial复制 serial \ serialposix.py - > build \ lib \ serial复制serial \ serialutil.py - > build \ lib \ serial复制serial \ serialwin32.py - > build \ lib \ serial复制serial \ win32.py - > build \ lib \ serial复制serial__init__.py - > build \ lib \ serial创建build \ lib \ serial \ tools复制serial \ tools \ hexlify_codec.py - > build \ lib \ serial \ tools复制 serial \ tools \ list_ports.py - > build \ lib \ serial \ tools复制 serial \ tools \ list_ports_common.py - > build \ lib \ serial \ tools复制 serial \ tools \ list_ports_linux.py - > build \ lib \ serial \ tools复制 serial \ tools \ list_ports_osx.py - > build \ lib \ serial \ tools复制 serial \ tools \ list_ports_posix.py - > build \ lib \ serial \ tools复制 serial \ tools \ list_ports_windows.py - > build \ lib \ serial \ tools复制 serial \ tools \ miniterm.py - > build \ lib \ serial \ tools复制 serial \ tools__init __。py - > build \ lib \ serial \ tools创建 build \ lib \ serial \ urlhandler复制serial \ urlhandler \ protocol_alt.py - > build \ lib \ serial \ urlhandler复制serial \ urlhandler \ protocol_hwgrep.py - >建立\ LIB \序列\ urlhandler 复制serial \ urlhandler \ protocol_loop.py - > build \ lib \ serial \ urlhandler复制 serial \ urlhandler \ protocol_rfc2217.py - >建立\ LIB \序列\ urlhandler 复制serial \ urlhandler \ protocol_socket.py - > build \ lib \ serial \ urlhandler复制serial \ urlhandler \ protocol_spy.py - > build \ lib \ serial \ urlhandler copy serial \ urlhandler__init __。py - > build \ lib \ serial \ urlhandler创建build \ lib \ serial \ threaded copy serial \ threaded__init __。py - >建立\ LIB \序列\螺纹 创建build \ bdist.win-amd64创建build \ bdist.win-amd64 \ egg 创建build \ bdist.win-amd64 \ egg \ serial复制 build \ lib \ serial \ aio.py - > build \ bdist.win-amd64 \ egg \ serial复制 build \ lib \ serial \ rfc2217.py - >建立\ bdist.win-AMD64 \蛋\串口 复制build \ lib \ serial \ rs485.py - >建立\ bdist.win-AMD64 \蛋\串口 复制build \ lib \ serial \ serialcli.py - > build \ bdist.win-amd64 \ egg \ serial复制 build \ lib \ serial \ serialjava.py - >建立\ bdist.win-AMD64 \蛋\串口 复制build \ lib \ serial \ serialposix.py - > build \ bdist.win-amd64 \ egg \ serial复制 build \ lib \ serial \ serialutil.py - >建立\ bdist.win-AMD64 \蛋\串口 复制build \ lib \ serial \ serialwin32.py - > build \ bdist.win-amd64 \ egg \ serial creating build \ bdist.win-amd64 \ egg \ serial \ threaded copy build \ lib \ serial \ threaded__init __。py - > build \ bdist.win-amd64 \ egg \ serial \ threaded创建 build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ hexlify_codec.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ list_ports.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ list_ports_common.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ list_ports_linux.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ list_ports_osx.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ list_ports_posix.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ list_ports_windows.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools \ miniterm.py - > build \ bdist.win-amd64 \ egg \ serial \ tools复制 build \ lib \ serial \ tools__init __。py - > build \ bdist.win-amd64 \ egg \ serial \ tools创建 build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ urlhandler \ protocol_alt.py - > build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ urlhandler \ protocol_hwgrep.py - > build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ urlhandler \ protocol_loop.py - > build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ urlhandler \ protocol_rfc2217.py - > build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ urlhandler \ protocol_socket.py - > build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ urlhandler \ protocol_spy.py - > build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ urlhandler__init __。py - > build \ bdist.win-amd64 \ egg \ serial \ urlhandler复制 build \ lib \ serial \ win32.py - > build \ bdist.win-amd64 \ egg \ serial复制 build \ lib \ serial__init __。py - >建立\ bdist.win-AMD64 \蛋\串口 字节编译build \ bdist.win-amd64 \ egg \ serial \ aio.py到 aio.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ rfc2217.py到rfc2217.cpython-35.pyc 字节编译build \ bdist.win-amd64 \ egg \ serial \ rs485.py到 rs485.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ serialcli.py to serialcli.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ serialjava.py to serialjava.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ serialposix.py to serialposix.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ serialutil.py to serialutil.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ serialwin32.py to serialwin32.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ threaded__init __。py to init .cpython-35.pyc字节编译build \ bdist.win-amd64 \ egg \ serial \ tools \ hexlify_codec.py到 hexlify_codec.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools \ list_ports.py to list_ports.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools \ list_ports_common.py to list_ports_common.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools \ list_ports_linux.py to list_ports_linux.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools \ list_ports_osx.py to list_ports_osx.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools \ list_ports_posix.py to list_ports_posix.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools \ list_ports_windows.py to list_ports_windows.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools \ miniterm.py to miniterm.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ tools__init __。py to init .cpython-35.pyc字节编译build \ bdist.win-amd64 \ egg \ serial \ urlhandler \ protocol_alt.py到 protocol_alt.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ urlhandler \ protocol_hwgrep.py to protocol_hwgrep.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ urlhandler \ protocol_loop.py to protocol_loop.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ urlhandler \ protocol_rfc2217.py to protocol_rfc2217.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ urlhandler \ protocol_socket.py to protocol_socket.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ urlhandler \ protocol_spy.py to protocol_spy.cpython-35.pyc字节编译 build \ bdist.win-amd64 \ egg \ serial \ urlhandler__init __。py to init .cpython-35.pyc字节编译build \ bdist.win-amd64 \ egg \ serial \ win32.py到win32.cpython-35.pyc 字节编译build \ bdist.win-amd64 \ egg \ serial__init __。py to init .cpython-35.pyc创建build \ bdist.win-amd64 \ egg \ EGG-INFO安装脚本来构建\ bdist.win-amd64 \ egg \ EGG-INFO \ scripts 运行运行build_scripts创建的install_scripts build \ scripts-3.5复制和调整serial \ tools \ miniterm.py - > build \ scripts-3.5创建build \ bdist.win-amd64 \ egg \ EGG-INFO \ scripts 复制build \ scripts-3.5 \ miniterm.py - > build \ bdist.win-amd64 \ egg \ EGG-INFO \ scripts复制 pyserial.egg-info \ PKG-INFO - >建立\ bdist.win-AMD64 \蛋\ EGG-INFO 复制pyserial.egg-info \ SOURCES.txt - > build \ bdist.win-amd64 \ egg \ EGG-INFO复制 pyserial.egg-info \ dependency_links.txt - > build \ bdist.win-amd64 \ egg \ EGG-INFO复制 pyserial.egg-info \ top_level.txt - >建立\ bdist.win-AMD64 \蛋\ EGG-INFO zip_safe标志未设置;分析存档内容...创建dist 创建' dist \ pyserial-3.0.1-py3.5.egg'并添加 '建立\ bdist.win-AMD64 \蛋'删除' build \ bdist.win-amd64 \ egg' (及其下的所有内容)处理pyserial-3.0.1-py3.5.egg复制 pyserial-3.0.1-py3.5.egg to C:\用户\用户\应用程序数据\本地\程序\ python的\ python35 \ LIB \站点包 将pyserial 3.0.1添加到easy-install.pth文件安装miniterm.py 脚本到C:\ Users \ User \ AppData \ Local \ Programs \ Python \ Python35 \ Scripts
已安装 C:\用户\用户\应用程序数据\本地\程序\ python的\ python35 \ LIB \站点包\ pyserial-3.0.1-py3.5.egg 处理pyserial == 3.0.1完成处理的依赖关系 pyserial的依赖关系== 3.0。