解决:slate报错 AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoade

Alexandra ·
更新时间:2024-11-10
· 910 次阅读

在学习《python数据处理》时遇到了安装slate出错,这个问题不仅在slate、在之前按照pycurl时也出现,一直没有解决,原因差不多,都是这个报错,涉及python setup.py egg_info Check the logs for full command output.
报错内容:

ERROR: Command errored out with exit status 1: command: 'C:\Users\Administrator\AppData\Local\Programs\Python\Python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pycharm-packaging\\distribute\\setup.py'"'"'; __file__='"'"'C:\\Users\\Administrator\\AppData\\Local\\Temp\\pycharm-packaging\\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\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\pip-egg-info' cwd: C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\ Complete output (15 lines): Traceback (most recent call last): File "", line 1, in File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\__init__.py", line 2, in from setuptools.extension import Extension, Library File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\extension.py", line 5, in from setuptools.dist import _get_unpatched File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\dist.py", line 7, in from setuptools.command.install import install File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\command\__init__.py", line 8, in from setuptools.command import install_scripts File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\setuptools\command\install_scripts.py", line 3, in from pkg_resources import Distribution, PathMetadata, ensure_directory File "C:\Users\Administrator\AppData\Local\Temp\pycharm-packaging\distribute\pkg_resources.py", line 1518, in 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.

原创文章 43获赞 28访问量 5万+ 关注 私信 展开阅读全文
作者:python__reported



module has bootstrap

需要 登录 后方可回复, 如果你还没有账号请 注册新账号
相关文章