Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
尝试使用wget创建运行Python脚本的Shell脚本_Python_Bash_Shell_Wget - Fatal编程技术网

尝试使用wget创建运行Python脚本的Shell脚本

尝试使用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

我尝试每天调用一次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
$ 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