Windows-curses 安装在 ubuntu

Windows-curses install on ubuntu

我正在尝试通过 运行 安装一个包(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.

更新的答案: 添加了有关在 Windows OS.

上安装 python-can 的信息

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

请注意,由于 IO 性质,在 Windows OS 机器上使用 python-can 时,需要额外的驱动程序或 back-end 引擎。首先从安装 link 安装列出的选项之一。然后尝试 pip 安装 python-can.

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

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

Windows dependencies:
Kvaser (one of many options)
To install python-can using the Kvaser CANLib SDK as the backend:

Install the latest stable release of Python. Install Kvaser’s latest Windows CANLib drivers. Test that Kvaser’s own tools work to ensure the driver is properly installed and that the hardware is working.

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

如果您使用的是 Python 3.6+,则 curses 似乎是 built-in Python for Ubuntu OS 的一部分,因此没有任何内容安装。您初始化会话以开始使用它。

import curses
stdscr = curses.initscr()

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