Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 安装程序包halo时出现错误:';安装需要';必须是包含有效项目/版本需求说明符的字符串或字符串列表_Python_Macos_Pip_Homebrew - Fatal编程技术网

Python 安装程序包halo时出现错误:';安装需要';必须是包含有效项目/版本需求说明符的字符串或字符串列表

Python 安装程序包halo时出现错误:';安装需要';必须是包含有效项目/版本需求说明符的字符串或字符串列表,python,macos,pip,homebrew,Python,Macos,Pip,Homebrew,我正在尝试使用安装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-

我正在尝试使用安装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.
这不起作用,我的终端返回:

Error: No formulae found in taps.
我用自制软件检查了我的配方,但没有找到Halo。然而,我发现了其他的软件包,所以我的自制软件可以在其他方面工作

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

alias python='python3'
错误按摩与python2相同,如上所述

我需要一个学校实验室的光环,我用的是Mac电脑


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

您只需通过: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

请修正你的格式。这不是JavascriptFixed!您现在可以帮助解决此问题吗?使用“pip安装-U setuptools.I获得错误消息”错误:由于环境原因无法安装软件包错误:。。。“我尝试了pip安装——用户U设置工具,它成功了!我必须添加--user。我将编辑我的答案以反映您所做的更改。这也不起作用。我收到的错误消息与另一个建议的解决方案相同,“错误:由于环境错误而无法安装软件包:…”请检查答案并告诉我结果。
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