【问题标题】:Windows-curses install on ubuntuWindows-curses 安装在 ubuntu 上
【发布时间】:2019-07-22 20:40:20
【问题描述】:

我正在尝试通过运行安装包(python-can) pip2 install python-can 我收到以下错误:

Collecting windows-curses (from python-can)
ERROR: Could not find a version that satisfies the requirement windows-curses (from python-can) (from versions: none)

Error: No matching distribution found for windows-curses (from python-can)

有什么建议吗?我在 Ubuntu 16.04 上。

【问题讨论】:

  • 你使用的是 Python 2.7 吗?

标签: python python-can


【解决方案1】:

更新答案: 添加了有关在 Windows 操作系统上安装 python-can 的信息。

https://python-can.readthedocs.io/en/master/installation.html#windows-dependencies

请注意,由于 IO 特性,在 Windows 操作系统机器上使用 python-can 时,需要额外的驱动程序或后端引擎。首先从安装链接安装列出的选项之一。然后尝试 pip 安装 python-can。

可以用 pip 安装: pip install python-can

请注意以下段落:
“由于您很可能希望与某些硬件进行接口,因此您可能还必须安装平台依赖项。请务必检查 CAN 接口模块中您的硬件的任何其他细节。”

Windows 依赖项:
Kvaser(众多选项之一)
使用 Kvaser CANLib SDK 作为后端安装 python-can:

安装最新的稳定版 Python。 安装 Kvaser 最新的 Windows CANLib 驱动程序。 测试 Kvaser 自己的工具是否正常工作,以确保驱动程序已正确安装并且硬件正常工作。

原答案:
(原始答案直接解决了错误消息。提供帮助以排除与 Python 的 curses 库安装问题相关的潜在错误。)

如果您使用的是 Python 3.6+,curses 似乎是 Ubuntu OS 内置 Python 的一部分,因此无需安装任何东西。您初始化一个会话以开始使用它。

import curses
stdscr = curses.initscr()

https://docs.python.org/3/howto/curses.html

【讨论】:

    猜你喜欢
    • 2017-03-12
    • 2018-09-25
    • 1970-01-01
    • 1970-01-01
    • 2021-12-23
    • 2017-06-02
    • 1970-01-01
    • 2018-10-13
    • 1970-01-01
    相关资源
    最近更新 更多