Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/image/5.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
尝试brew postinstall python3时出错_Python_Python 3.x_Homebrew - Fatal编程技术网

尝试brew postinstall python3时出错

尝试brew postinstall python3时出错,python,python-3.x,homebrew,Python,Python 3.x,Homebrew,我需要pip3,所以我正在尝试brew安装python3,因为它已经包含在内了。我遇到了这个错误(这似乎涉及到系统python),brew postinstall python3失败 我尝试删除自制安装的python3,但没有任何帮助 我跑: brew remove python3; brew install python3; 它说安装失败,但没有完成,因此我运行: brew postinstall python3 以下是输出: /usr/local/Cellar/python3/3.5.1

我需要
pip3
,所以我正在尝试
brew安装python3
,因为它已经包含在内了。我遇到了这个错误(这似乎涉及到系统python),brew postinstall python3失败

我尝试删除自制安装的python3,但没有任何帮助

我跑:

brew remove python3; brew install python3;
它说安装失败,但没有完成,因此我运行:

brew postinstall python3
以下是输出:

/usr/local/Cellar/python3/3.5.1/bin/python3
-s
setup.py
--no-user-cfg
install
--force
--verbose
--install-scripts=/usr/local/Cellar/python3/3.5.1/bin
--install-lib=/usr/local/lib/python3.5/site-packages
--single-version-externally-managed
--record=installed.txt

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/enum/__init__.py", line 371, in __getattr__
    return cls._member_map_[name]
KeyError: '_convert'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    exec(init_file.read(), command_ns)
  File "<string>", line 11, in <module>
  File "/usr/local/Cellar/python3/3.5.1/libexec/setuptools/setuptools/__init__.py", line 12, in <module>
    from setuptools.extension import Extension
  File "/usr/local/Cellar/python3/3.5.1/libexec/setuptools/setuptools/extension.py", line 8, in <module>
    from .dist import _get_unpatched
  File "/usr/local/Cellar/python3/3.5.1/libexec/setuptools/setuptools/dist.py", line 16, in <module>
    from setuptools.depends import Require
  File "/usr/local/Cellar/python3/3.5.1/libexec/setuptools/setuptools/depends.py", line 6, in <module>
    from setuptools import compat
  File "/usr/local/Cellar/python3/3.5.1/libexec/setuptools/setuptools/compat.py", line 45, in <module>
    import http.client as httplib
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py", line 71, in <module>
    import email.parser
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/parser.py", line 12, in <module>
    from email.feedparser import FeedParser, BytesFeedParser
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/feedparser.py", line 27, in <module>
    from email import message
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/message.py", line 16, in <module>
    from email import utils
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/utils.py", line 29, in <module>
    import socket
  File "/usr/local/Cellar/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socket.py", line 73, in <module>
    IntEnum._convert(
  File "/Library/Python/2.7/site-packages/enum/__init__.py", line 373, in __getattr__
    raise AttributeError(name)
AttributeError: _convert

Python: /usr/local/bin/python => /usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7
/usr/local/cell/python3/3.5.1/bin/python3
-
setup.py
--无用户cfg
安装
--强迫
--冗长的
--安装脚本=/usr/local/ceral/python3/3.5.1/bin
--安装lib=/usr/local/lib/python3.5/site-packages
--外部管理的单一版本
--record=installed.txt
回溯(最近一次呼叫最后一次):
文件“/Library/Python/2.7/site packages/enum/_init__uuuu.py”,第371行,在_getattr中__
返回cls.\u成员\u映射\u[名称]
KeyError:“\u convert”
在处理上述异常期间,发生了另一个异常:
回溯(最近一次呼叫最后一次):
文件“setup.py”,第21行,在
exec(init_file.read(),command_ns)
文件“”,第11行,在
文件“/usr/local/cillar/python3/3.5.1/libexec/setuptools/setuptools/__init__;.py”,第12行,在
从setuptools.extension导入扩展
文件“/usr/local/ceral/python3/3.5.1/libexec/setuptools/setuptools/extension.py”,第8行,在
从.dist导入\u获取\u取消修补
文件“/usr/local/ceral/python3/3.5.1/libexec/setuptools/setuptools/dist.py”,第16行,在
从setuptools.dependens导入所需
文件“/usr/local/ceral/python3/3.5.1/libexec/setuptools/setuptools/depends.py”,第6行,在
从setuptools导入compat
文件“/usr/local/ceral/python3/3.5.1/libexec/setuptools/setuptools/compat.py”,第45行,在
将http.client作为httplib导入
文件“/usr/local/ceral/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/http/client.py”,第71行,在
导入email.parser
文件“/usr/local/ceral/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/parser.py”,第12行
从email.feedparser导入feedparser,BytesFeedParser
文件“/usr/local/ceral/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/feedparser.py”,第27行
从电子邮件导入消息
文件“/usr/local/ceral/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/message.py”,第16行,在
从电子邮件导入utils
文件“/usr/local/ceral/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/email/utils.py”,第29行,在
导入套接字
文件“/usr/local/ceral/python3/3.5.1/Frameworks/Python.framework/Versions/3.5/lib/python3.5/socket.py”,第73行,在
内部转换(
文件“/Library/Python/2.7/site packages/enum/_init__uuuu.py”,第373行,在_getattr中__
提升属性错误(名称)
AttributeError:\u转换
Python:/usr/local/bin/Python=>/usr/local/ceral/Python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7

不清楚您的错误消息反映了什么:您使用了什么命令,在安装Python3和卸载Python3的描述中发生了什么,等等。我运行了
brew remove Python3;brew install Python3;
它说安装失败没有完成,所以我运行了
brew postinstall Python3
。然后它给出了一个错误提示上面。是否有明确的
PYTHONPATH
设置?这可以很好地解释为什么选择了那些2.7库/模块。设置
PYTHONPATH
修复了它,谢谢。我如何接受这个答案?您是设置了
PYTHONPATH
,还是取消设置了它?正确的解决方案通常意味着取消设置它。如果您没有取消设置它,是为了什么卢:是你定的吗?