我正在使用此代码。
from azlyrics import artists
print(artists("O"))
在名为“ azlyrics”的模块中,明确定义了“艺术家”功能。但我收到此错误。
Traceback (most recent call last):
File "C:\Users\user\Desktop\python\eminem\New folder\azlyrics-master\examples\get_artists.py", line 1, in <module>
from azlyrics import artists
ImportError: cannot import name 'artists' from 'azlyrics' (C:\Users\user\AppData\Local\Programs\Python\Python37\lib\site-packages\azlyrics\__init__.py)
可能是什么问题?
向我们显示您的文件树。
azlyrics.py与您当前正在使用的脚本位于同一目录中吗?