我正在尝试使用pip安装一个python库,它告诉我它需要setuptools所以然后我尝试安装setuptools,虽然一切似乎都成功了,但它并没有意识到它已安装.知道我在这里可能缺少什么吗?
$sudo pip install gmusicapi
Downloading/unpacking gmusicapi
Downloading gmusicapi-7.0.0.tar.gz (147kB): 147kB downloaded
Cleaning up...
setuptools must be installed to install from a source distribution
Storing debug log for failure in /Users/.../Library/Logs/pip.log
$sudo pip install setuptools
Downloading/unpacking setuptools
Downloading setuptools-18.3.2-py2.py3-none-any.whl (462kB): 462kB downloaded
Installing collected packages: setuptools
Successfully installed setuptools
Cleaning up...
$sudo pip install gmusicapi
Downloading/unpacking gmusicapi
Downloading gmusicapi-7.0.0.tar.gz (147kB): 147kB downloaded
Cleaning up...
setuptools must be installed to install from a source distribution
Storing debug log for failure in /Users/..../Library/Logs/pip.log
解决方法:
这很奇怪.在没有安装setuptools的情况下安装gmusicapi时,我能够重现您的第一个错误.但是,在安装setuptools(setuptools-18.4-py2.py3-none-any.whl)后,我能够成功安装gmusicapi.
你可以尝试:
>在新的虚拟环境中安装gmusicapi
>卸载setuptools(pip卸载setuptools – 在你可能需要多次卸载软件包的情况下,重复它,直到你看到没有安装setuptools软件包的消息)并重新安装它
编辑:
我也尝试使用setuptools == 18.3.2,它也适用于我.