我有一个使用 YAML 的 Python 程序。我尝试使用 pip install yaml
将它安装在新服务器上,它返回以下内容:
$ sudo pip install yaml
Downloading/unpacking yaml
Could not find any downloads that satisfy the requirement yaml
No distributions at all found for yaml
Storing complete log in /home/pa/.pip/pip.log
如何为 Python 安装 yaml 包?我正在运行 Python 2.7。 (操作系统:Debian Wheezy)
原文由 harperville 发布,翻译遵循 CC BY-SA 4.0 许可协议
你可以试试pip中的搜索功能,
它在简短描述中使用 yaml 在 PyPI 中查找包。这揭示了各种包,包括 PyYaml、yamltools 和 PySyck 等(请注意, PySyck 文档 建议使用 PyYaml,因为 syck 已过时)。现在你知道了一个特定的包名,你可以安装它:
如果要在 linux 系统范围内安装 python yaml,还可以使用包管理器,例如
aptitude
或yum
: