Skip to main content
 首页 » 编程设计

python之Debian Python 2.5 包括来自 AlchemyAPI 的模块

2025年05月04日7Renyi-Fan

正在尝试安装 AlchemyAPI.py-2.5

无法运行示例。

Debian 6.0

python 示例/sentiment.py:

Traceback (most recent call last): 
  File "example/sentiment.py", line 4, in <module> 
    import AlchemyAPI 
ImportError: No module named AlchemyAPI 

如何安装该模块? 在自述文件中说:

To install this module, copy the desired AlchemyAPI.py file into your desired Python import directory.

如果我在 debian 上运行,我想要的目录是什么?

非常困惑,感谢任何帮助。

请您参考如下方法:

您需要将 AlchemyAPI.py-2.5 重命名为 AlchemyAPI.py 才能导入,并将其添加到 PYTHONPATH(其中包括 Python 包目录和工作目录)。

在您的示例中,您可以将文件复制到:example/AlchemyAPI.py。