[英]Syntax error when calling github package in anaconda
I get a syntax error when I try to use the bandcamp-dl package from github to download a full-album. 当我尝试从github使用bandcamp-dl包下载完整专辑时,出现语法错误。 Please note I am using Anaconda with Python 3 on Windows.
请注意,我在Windows上将Anaconda与Python 3一起使用。
To install the package in Anaconda, I followed the instructions from Conda: Installing / upgrading directly from github 要在Anaconda中安装软件包,我遵循了Conda的指示:直接从github安装/升级
Activate your conda environment source activate myenv
激活您的conda环境
source activate myenv
conda install git pip
pip install git+git://github.com/iheanyi/bandcamp-dl
Next I followed the instructions in the wiki to download a full -album https://github.com/iheanyi/bandcamp-dl/wiki/How-To-Use-%22For-Dummies%22 接下来,我按照Wiki中的说明下载了完整的相册https://github.com/iheanyi/bandcamp-dl/wiki/How-To-Use-%22For-Dummies%22
bandcamp-dl https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll
I run the following code in anaconda prompt. 我在anaconda提示符下运行以下代码。
import bandcamp_dl
bandcamp-dl https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll
and get this syntax error 并得到此语法错误
bandcamp-dl https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll File "", line 1 bandcamp-dl https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll ^ SyntaxError: invalid syntax`
bandcamp-dl https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll文件“”,第1行bandcamp-dl https://sdoggingsworth.bandcamp.com/album/snacks-hugs -and-rock-n-roll ^ SyntaxError:无效的语法`
Issue: Full album is supposed to download but I get a syntax error. 问题:应该下载完整专辑,但出现语法错误。
You tryed this ? 您尝试了吗?
bandcamp-dl 'https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll'
Around hyperlink with quotes 带有引号的超链接周围
You're trying to run this inside a python file. 您正在尝试在python文件中运行此文件。 It is a command-line utility, not a library.
它是一个命令行实用程序,而不是库。 From the github page :
从github页面 :
bandcamp-dl is a small command-line app to download audio from BandCamp.com.
bandcamp-dl是一个小型命令行应用程序,可以从BandCamp.com下载音频。 It requires the Python interpreter, version 3.4 (or higher) and is not platform specific.
它需要Python解释器3.4版(或更高版本),并且不是特定于平台的。
It needs python to run, but should not be run from a python file. 它需要python才能运行,但不应从python文件运行。 Use your command-line to run
使用命令行运行
bandcamp-dl https://sdoggingsworth.bandcamp.com/album/snacks-hugs-and-rock-n-roll
and it should work 它应该工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.