尝试通过以下方式安装mass
:
pip install mass
导致此错误的原因:
C:\WINDOWS\system32>pip install mass
Collecting mass
Using cached https://files.pythonhosted.org/packages/7b/54/97abbc40b4087748aecee98b19aecb4e1ca42a19cbce3b5b9984e91baa3f/mass-0.1.4.tar.gz
Collecting distribute (from mass)
Using cached https://files.pythonhosted.org/packages/5f/ad/1fde06877a8d7d5c9b60eff7de2d452f639916ae1d48f0b8f97bf97e570a/distribute-0.7.3.zip
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\671D~1\AppData\Local\Temp\pip-install-1uxrpcwd\distribute\setuptools\__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "C:\Users\671D~1\AppData\Local\Temp\pip-install-1uxrpcwd\distribute\setuptools\extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "C:\Users\671D~1\AppData\Local\Temp\pip-install-1uxrpcwd\distribute\setuptools\dist.py", line 7, in <module>
from setuptools.command.install import install
File "C:\Users\671D~1\AppData\Local\Temp\pip-install-1uxrpcwd\distribute\setuptools\command\__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "C:\Users\671D~1\AppData\Local\Temp\pip-install-1uxrpcwd\distribute\setuptools\command\install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "C:\Users\671D~1\AppData\Local\Temp\pip-install-1uxrpcwd\distribute\pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\671D~1\AppData\Local\Temp\pip-install-1uxrpcwd\distribute\
You are using pip version 19.0.2, however version 19.0.3 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
如何解决?