尝试安装ipython时出现奇怪的错误

时间:2017-03-08 15:27:52

标签: python ipython

我跑了

sudo pip install ipython

在命令行完成安装过程的大部分时间后出现以下错误:

 Running setup.py install for scandir ... error
    Complete output from command /usr/bin/python -u -c "import 
setuptools, tokenize;__file__='/private/tmp/pip-build-  
szsEFp/scandir/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
/tmp/pip-iOop0U-record/install-record.txt --single-version-externally-
managed --compile:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/Library/Python/2.7/site-packages/setuptools/__init__.py",   
line 12, in <module>
        import setuptools.version
      File "/Library/Python/2.7/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, 
tokenize;__file__='/private/tmp/pip-build-
szsEFp/scandir/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n', 
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
/tmp/pip-iOop0U-record/install-record.txt --single-version-externally-
managed --compile" failed with error code 1 in /private/tmp/pip-build-
szsEFp/scandir/

发生了什么事?

0 个答案:

没有答案