首页 > 解决方案 > 在 MacOS 10.15 上使用 Pip install 安装包

问题描述

使用 Python3.7.3、MacOS 10.15

无法安装包 - 羽毛尝试了 pip3 安装羽毛

返回错误:

ERROR: Command errored out with exit status 1:
     command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/vl/pzz3tlxx6_d5p38wth_1nnwr0000gn/T/pip-install-3p9h1fgs/feather/setup.py'"'"'; __file__='"'"'/private/var/folders/vl/pzz3tlxx6_d5p38wth_1nnwr0000gn/T/pip-install-3p9h1fgs/feather/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 pip-egg-info
         cwd: /private/var/folders/vl/pzz3tlxx6_d5p38wth_1nnwr0000gn/T/pip-install-3p9h1fgs/feather/
    Complete output (31 lines):
    Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
    Traceback (most recent call last):
      File "/private/var/folders/vl/pzz3tlxx6_d5p38wth_1nnwr0000gn/T/pip-install-3p9h1fgs/feather/distribute_setup.py", line 143, in use_setuptools
        raise ImportError
    ImportError

错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出。

我要做的就是避免在 spyder 中出现这个错误

ModuleNotFoundError:没有名为“羽毛”的模块

有人可以帮助我了解为什么我会遇到这样的问题

标签: python-3.xpipinstallationmacos-catalina

解决方案


看起来 setuptools 不见了。尝试pip3 install setuptools

这是报告错误的地方。

            # Setuptools 0.7b and later is a suitable (and preferable)
            # substitute for any Distribute version.
            try:
                pkg_resources.require("setuptools>=0.7b")
                return
            except (pkg_resources.DistributionNotFound,
                    pkg_resources.VersionConflict):
                pass

            if not hasattr(pkg_resources, '_distribute'):
                if not no_fake:
                    _fake_setuptools()
                raise ImportError

setuptools 的版本号是多少?


推荐阅读