【发布时间】:2014-05-20 08:09:10
【问题描述】:
我想为 python 使用“kconfiglib”,但执行时出现“ImportError”。 Kconfiglib 附带了一些示例,例如:
#! /bin/python
# Prints the names of all symbols that reference a particular symbol. (There's
# also a method get_selected_symbols() for determining just selection
# relations.)
import kconfiglib
import sys
conf = kconfiglib.Config(sys.argv[1])
x86 = conf["X86"]
for sym in conf:
if x86 in sym.get_referenced_symbols():
print sym.get_name()
运行时出现以下错误:
ImportError: no module named kconfiglib
所以我猜 kconfiglib 没有作为标准安装。库。但是我该如何改变呢?我在互联网上寻找解决方案,但它们主要是关于无法导入的类似库,他们的解决方案通常是安装新的“rpm”。但是 AFAIK 没有用于 kconfiglib 的 rpm。
所以我需要一个解决方案来以“硬编码”方式执行此操作。有人有想法吗?
感谢您的支持
【问题讨论】:
-
你试过instructions吗?您可能需要先安装Git。
-
导致更令人不安的错误消息
标签: python import shared-libraries static-libraries python-import