【问题标题】:Why is setuptools installing but still not recognized?为什么 setuptools 正在安装但仍然无法识别?
【发布时间】:2016-01-01 14:29:11
【问题描述】:

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

【问题讨论】:

    标签: python pip setuptools


    【解决方案1】:

    这很奇怪。在没有安装setuptools 的情况下安装gmusicapi 时,我能够重现您的第一个错误。但是,在安装setuptools (setuptools-18.4-py2.py3-none-any.whl) 之后,我能够成功安装 gmusicapi。

    你可以试试:

    • 在新的虚拟环境中安装gmusicapi
    • 卸载setuptoolspip uninstall setuptools - 在某些情况下,您可能需要多次卸载软件包,重复此操作,直到您看到 setuptools 软件包未安装的消息)然后重新安装

    编辑:

    我也用setuptools==18.3.2 尝试过,它也对我有用。

    【讨论】:

      猜你喜欢
      • 2015-08-23
      • 2020-12-27
      • 2014-10-09
      • 2015-09-18
      • 2020-09-14
      • 2020-06-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多