Installing package halo gives error: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

Installing package halo gives error: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

我正在尝试使用

安装 Halo
pip install halo

我收到以下错误消息:

    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/setup.py'"'"'; __file__='"'"'/private/var/folders/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/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 /private/var/folders/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/pip-egg-info
         cwd: /private/var/folders/9s/vjh90rsn4xl5587hr11qpjjh0000gn/T/pip-install-L5LD_D/halo/
    Complete output (3 lines):
    /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'long_description_content_type'
      warnings.warn(msg)
    error in halo setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Expected ',' or end-of-list in backports.shutil_get_terminal_size>=1.0.0;python_version < '3.3' at ;python_version < '3.3'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

我的 python 版本是 2.7.10。

我做了一些研究并尝试了以下解决方案,

brew install halo 

这没有用,我的终端返回:

Error: No formulae found in taps.

我在 Homebrew 中检查了我的公式,但找不到 Halo。但是,我找到了其他软件包,因此我的 Homebrew 可以正常工作。

我尝试通过更改别名并再次安装 halo 将我的 python 版本更改为 3,但它也没有用。

alias python='python3'

错误消息与 python2 相同,如上所述。

我需要学校实验室的光环,我正在使用 Mac。

看起来这是该软件包的一个已知错误:

https://github.com/manrajgrover/halo/issues/79

您只需通过以下方式更新设置工具:pip install -U setuptools

如果这不起作用,请尝试添加 --user 标志:pip install --user -U setuptools

试试这个命令

pip3 install --user package-name  # for Python3
pip install -U setuptools && pip install halo  # for Python3

pip install --user package-name   # for Python2
pip3 install -U setuptools && pip install halo # for Python2