Python分发安装Mac



我正在尝试安装MAC一个MAC。我尝试了PIP安装分发并获得了错误

***"""***
Collecting distribute
  Using cached 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 "/private/var/folders/hj/gz4x7_lj5r9_shsmq40r2y180000gn/T/pip-build-10mpi66y/distribute/setuptools/__init__.py", line 2, in <module>
        from setuptools.extension import Extension, Library
      File "/private/var/folders/hj/gz4x7_lj5r9_shsmq40r2y180000gn/T/pip-build-10mpi66y/distribute/setuptools/extension.py", line 5, in <module>
        from setuptools.dist import _get_unpatched
      File "/private/var/folders/hj/gz4x7_lj5r9_shsmq40r2y180000gn/T/pip-build-10mpi66y/distribute/setuptools/dist.py", line 7, in <module>
        from setuptools.command.install import install
      File "/private/var/folders/hj/gz4x7_lj5r9_shsmq40r2y180000gn/T/pip-build-10mpi66y/distribute/setuptools/command/__init__.py", line 8, in <module>
        from setuptools.command import install_scripts
      File "/private/var/folders/hj/gz4x7_lj5r9_shsmq40r2y180000gn/T/pip-build-10mpi66y/distribute/setuptools/command/install_scripts.py", line 3, in <module>
        from pkg_resources import Distribution, PathMetadata, ensure_directory
      File "/private/var/folders/hj/gz4x7_lj5r9_shsmq40r2y180000gn/T/pip-build-10mpi66y/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 /private/var/folders/hj/gz4x7_lj5r9_shsmq40r2y180000gn/T/pip-build-10mpi66y/distribute/
***"""***

我尝试了程序" distribute_setup.py",然后通过运行" python3.6 install_distribute.py",但获得了错误" urllib.error.httperror:http error 403:SSL是必需的"

ssl">

我尝试更新Urllib,但说这是正确的。有任何建议吗?

'distribute'模块被弃用。它的发展现在已成为" Setuptools"的一部分。因此,如果您安装" setuptools",则应该获得"分发"。请参阅:

  • https://pypi.python.org/pypi/distribute/0.7.3
  • https://pypi.python.org/pypi/distribute/0.6.49

PYPI的第一个链接甚至说"分发":

此软件包是一个简单的兼容性层,安装setuptools 0.7 。

因此,您可能会尝试安装或更新" setuptools",这可能会更好。要获得更多信息,我认为这两个问题都有:

  1. 您的PIP版本
  2. 您的Python版本
  3. 或您的" setuptools"

这是我感兴趣的行:

AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'

此错误似乎正在尝试使用旧版本中不存在的新添加的功能。因此,您可能需要更新PIP或" setuptools"。

尝试:

  • 使用PIP3:Module&quort'expertlib._bootstrap; quot&quot没有属性" sourceFileLeleoDADER"

具体来说,请参阅此答案:https://stackoverflow.com/a/47278208/9347694

也尝试,

  • sudo pip安装setuptools-升级错误

似乎其他人在安装Python 3.6后经历了这个问题。您确定正在使用PIP3吗?PIP更新了吗?您是否正确安装了" Seyuptools"?

相关内容

  • 没有找到相关文章

最新更新