【问题标题】:Unable to install SLATE via PIP无法通过 PIP 安装 SLATE
【发布时间】:2021-04-21 17:10:47
【问题描述】:

当我尝试使用 pip install slate 安装 slate 时出现以下错误:

C:\Users\co_46>pip install slate
Collecting slate
  Using cached slate-0.3.zip (20 kB)
Collecting distribute
  Using cached distribute-0.7.3.zip (145 kB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\co_46\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\co_46\\AppData\\Local\\Temp\\pip-install-qq4oek2a\\distribute\\setup.py'"'"'; __file__='"'"'C:\\Users\\co_46\\AppData\\Local\\Temp\\pip-install-qq4oek2a\\distribute\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\co_46\AppData\Local\Temp\pip-pip-egg-info-2veaa5ur'
         cwd: C:\Users\co_46\AppData\Local\Temp\pip-install-qq4oek2a\distribute\
    Complete output (15 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\co_46\AppData\Local\Temp\pip-install-qq4oek2a\distribute\setuptools\__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "C:\Users\co_46\AppData\Local\Temp\pip-install-qq4oek2a\distribute\setuptools\extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "C:\Users\co_46\AppData\Local\Temp\pip-install-qq4oek2a\distribute\setuptools\dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "C:\Users\co_46\AppData\Local\Temp\pip-install-qq4oek2a\distribute\setuptools\command\__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "C:\Users\co_46\AppData\Local\Temp\pip-install-qq4oek2a\distribute\setuptools\command\install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "C:\Users\co_46\AppData\Local\Temp\pip-install-qq4oek2a\distribute\pkg_resources.py", line 1518, in <module>
        register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
    AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我在 Windows 10 机器上使用 Python 3.9.1。在进行了一些研究并发现这可能是问题后,我尝试更新 GEVENT,但仍然失败。

有人对如何解决这个问题有任何想法吗?

【问题讨论】:

  • 这个包很旧,看起来不支持Python3。你也许能找到一个支持你的 Python 版本的 fork,pypi.org/project/slate3k 是一个选项,虽然它也有一段时间没有更新了

标签: python pip slate


【解决方案1】:

使用完整的 repo URL 对我有用:

pip install https://github.com/timClicks/slate/archive/master.zip

【讨论】: