导入psutil-Python版本2.7.7 psutil版本2.1.3时出错

导入psutil-Python版本2.7.7 psutil版本2.1.3时出错,python,Python,我正在尝试在python上导入psutil,结果如下: Python 2.7.7 (v2.7.7:f89216059edf, May 31 2014, 12:53:48) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import psutil Traceback (

我正在尝试在python上导入psutil,结果如下:

Python 2.7.7 (v2.7.7:f89216059edf, May 31 2014, 12:53:48) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import psutil
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/__init__.py", line 148, in <module>
    import psutil._psosx as _psplatform
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/psutil/_psosx.py", line 29, in <module>
    cext.TCPS_ESTABLISHED: _common.CONN_ESTABLISHED,
AttributeError: 'module' object has no attribute 'TCPS_ESTABLISHED'
Python 2.7.7(v2.7.7:f89216059edf,2014年5月31日,12:53:48)
[GCC 4.2.1(苹果公司建造5666)(dot 3)]关于达尔文
有关详细信息,请键入“帮助”、“版权”、“信用证”或“许可证”。
>>>导入psutil
回溯(最近一次呼叫最后一次):
文件“”,第1行,在
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site packages/psutil/__init__.py”,第148行,在
将psutil.\u psosx作为\u psplatform导入
文件“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site packages/psutil/_psosx.py”,第29行,在
cext.TCPS_已建立:_common.CONN_已建立,
AttributeError:“模块”对象没有属性“TCPS\U已建立”

你试过了吗?是的,我试过了,但因为它不是用GIT安装的,所以不相关,psutil是用PIPI安装的。我建议你从GIT重新安装它。你可以要求pip安装特定版本的
psutil
pip install psutil==2.1.3