【发布时间】:2014-09-19 23:38:09
【问题描述】:
我正在尝试每天调用一次 API,并使用 Python 将数据保存在 json 中并将其转换为 csv 文件。
我正在使用 wget 库来下载文件。 即使我正确安装了 wget 并且能够在 Python Shell 中使用它,我也无法在 bash 中运行脚本,因为我收到了错误:
File "<stdin>", line 1, in <module>
ImportError: No module named wget
如何在 bash 上安装 wget? 也许有一个我可以使用的内置库?
我使用 wget 的代码是:
import wget
file_url = 'http://api-website'
file_name = wget.download(file_url)
【问题讨论】:
-
您可能需要使用 pip 安装 wget python 模块。