尝试使用wget创建运行Python脚本的Shell脚本
我尝试每天调用一次API,使用Python将数据保存在json中,并将其转换为csv文件 我正在使用wget库下载该文件。 尽管我正确安装了wget,并且能够在Python Shell中使用它,但我无法在bash中运行脚本,因为我遇到了以下错误:尝试使用wget创建运行Python脚本的Shell脚本,python,bash,shell,wget,Python,Bash,Shell,Wget,我尝试每天调用一次API,使用Python将数据保存在json中,并将其转换为csv文件 我正在使用wget库下载该文件。 尽管我正确安装了wget,并且能够在Python Shell中使用它,但我无法在bash中运行脚本,因为我遇到了以下错误: File "<stdin>", line 1, in <module> ImportError: No module named wget 下载wget表单链接并使用以下命令安装: 提取Wget $ cd /tmp/wget
File "<stdin>", line 1, in <module>
ImportError: No module named wget
下载
wget
表单链接并使用以下命令安装:
提取Wget
$ cd /tmp/wget
$ gzip -dc < wget-2.2.tar.gz | tar -xf -
$ cd wget-2.2
安装Wget(必须是root用户)
您可能需要使用pip安装wget-python模块,我使用的是cygwin,因此我认为这两个命令都不适用。
$ cd /tmp/wget
$ gzip -dc < wget-2.2.tar.gz | tar -xf -
$ cd wget-2.2
$ ./configure --prefix=/usr
$ make
$ sudo make install