0

当我尝试使用安装 slate 时出现以下错误pip install 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,但仍然失败。

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

4

1 回答 1

0

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

pip install https://github.com/timClicks/slate/archive/master.zip
于 2021-09-21T09:01:31.173 回答