无法在macOS中安装IPython

无法在macOS中安装IPython,python,ipython,Python,Ipython,我无法在macOS Sierra上安装带有pip的ipython。在安装结束时,我遇到了问题。出现了错误号为1的操作系统错误(不允许使用应用程序)。pip有任何问题吗?我的mac上有python 2和3 pip install ipython Collecting ipython Using cached ipython-5.4.1-py2-none-any.whl Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython)

我无法在macOS Sierra上安装带有pip的ipython。在安装结束时,我遇到了问题。出现了错误号为1的操作系统错误(不允许使用应用程序)。pip有任何问题吗?我的mac上有python 2和3

pip install ipython
Collecting ipython
  Using cached ipython-5.4.1-py2-none-any.whl
Collecting prompt-toolkit<2.0.0,>=1.0.4 (from ipython)
  Using cached prompt_toolkit-1.0.14-py2-none-any.whl
Collecting decorator (from ipython)
  Using cached decorator-4.0.11-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=18.5 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from ipython)
Collecting pickleshare (from ipython)
  Using cached pickleshare-0.7.4-py2.py3-none-any.whl
Collecting pygments (from ipython)
  Using cached Pygments-2.2.0-py2.py3-none-any.whl
Collecting pexpect; sys_platform != "win32" (from ipython)
  Using cached pexpect-4.2.1-py2.py3-none-any.whl
Collecting pathlib2; python_version == "2.7" or python_version == "3.3" (from ipython)
  Using cached pathlib2-2.2.1-py2.py3-none-any.whl
Collecting backports.shutil-get-terminal-size; python_version == "2.7" (from ipython)
  Using cached backports.shutil_get_terminal_size-1.0.0-py2.py3-none-any.whl
Collecting simplegeneric>0.8 (from ipython)
  Using cached simplegeneric-0.8.1.zip
Collecting traitlets>=4.2 (from ipython)
  Using cached traitlets-4.3.2-py2.py3-none-any.whl
Collecting appnope; sys_platform == "darwin" (from ipython)
  Using cached appnope-0.1.0-py2.py3-none-any.whl
Collecting six>=1.9.0 (from prompt-toolkit<2.0.0,>=1.0.4->ipython)
  Using cached six-1.10.0-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.4->ipython)
  Using cached wcwidth-0.1.7-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect; sys_platform != "win32"->ipython)
  Using cached ptyprocess-0.5.1-py2.py3-none-any.whl
Collecting scandir; python_version < "3.5" (from pathlib2; python_version == "2.7" or python_version == "3.3"->ipython)
  Using cached scandir-1.5.tar.gz
Collecting enum34; python_version == "2.7" (from traitlets>=4.2->ipython)
  Using cached enum34-1.1.6-py2-none-any.whl
Collecting ipython-genutils (from traitlets>=4.2->ipython)
  Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl
Installing collected packages: six, wcwidth, prompt-toolkit, decorator, scandir, pathlib2, pickleshare, pygments, ptyprocess, pexpect, backports.shutil-get-terminal-size, simplegeneric, enum34, ipython-genutils, traitlets, appnope, ipython
  Found existing installation: six 1.4.1
    DEPRECATION: Uninstalling a distutils installed project (six) has been deprecated and will be removed in a future version. This is due to the fact that uninstalling a distutils project will only partially uninstall the project.
    Uninstalling six-1.4.1:
Exception:
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/Library/Python/2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 103, in copystat
    os.chflags(dst, st.st_flags)
OSError: [Errno 1] Operation not permitted: '/var/folders/ws/yr231f3x1n3gh1lt85c0m4fm0000gn/T/pip-ViwdCl-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six-1.4.1-py2.7.egg-info'
pip安装ipython
收集伊皮顿
使用缓存的ipython-5.4.1-py2-none-any.whl
收集提示toolkit=1.0.4(来自ipython)
使用缓存的prompt_toolkit-1.0.14-py2-none-any.whl
收集装饰师(来自ipython)
使用缓存的decorator-4.0.11-py2.py3-none-any.whl
已满足要求:setuptools>=18.5 in/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/Python(来自ipython)
收集PickerShare(来自ipython)
使用缓存的pickleshare-0.7.4-py2.py3-none-any.whl
收集pygments(来自ipython)
使用缓存的Pygments-2.2.0-py2.py3-none-any.whl
收集期望值;系统平台!=“win32”(来自ipython)
使用缓存的pexpect-4.2.1-py2.py3-none-any.whl
收集路径lib2;python_版本==“2.7”或python_版本==“3.3”(来自ipython)
使用缓存的路径lib2-2.2.1-py2.py3-none-any.whl
收集backport.shutil-get-terminal-size;python_version==“2.7”(来自ipython)
使用缓存的backport.shutil\u get\u terminal\u size-1.0.0-py2.py3-none-any.whl
收集simplegeneric>0.8(来自ipython)
使用缓存的simplegeneric-0.8.1.zip
收集traitlets>=4.2(来自ipython)
使用缓存的traitlets-4.3.2-py2.py3-none-any.whl
收集appnope;sys_平台==“达尔文”(来自ipython)
使用缓存的appnope-0.1.0-py2.py3-none-any.whl
收集六个>=1.9.0(从prompt toolkit=1.0.4->ipython)
使用缓存的six-1.10.0-py2.py3-none-any.whl
收集wcwidth(从提示toolkit=1.0.4->ipython)
使用缓存的wcwidth-0.1.7-py2.py3-none-any.whl
正在收集ptyprocess>=0.5(来自pexpect;系统平台!=“win32”->ipython)
使用缓存的ptyprocess-0.5.1-py2.py3-none-any.whl
收集丑闻;python_版本<“3.5”(来自pathlib2;python_版本==“2.7”或python_版本==“3.3”->ipython)
使用缓存的scandir-1.5.tar.gz
收集样本34份;python_version==“2.7”(来自traitlets>=4.2->ipython)
使用缓存的enum34-1.1.6-py2-none-any.whl
收集ipython膝(从traitlets>=4.2->ipython)
使用缓存的ipython_genutils-0.2.0-py2.py3-none-any.whl
安装收集的软件包:six、wcwidth、prompt toolkit、decorator、scandir、pathlib2、pickleshare、pygments、ptyprocess、pexpect、Backport.shutil-get-terminal-size、simplegeneric、enum34、ipython genutils、traitlets、appnope、ipython
找到现有安装:六个1.4.1
弃用:卸载distutils安装的项目(六个)已弃用,并将在未来版本中删除。这是因为卸载distutils项目只会部分卸载该项目。
卸载six-1.4.1:
例外情况:
回溯(最近一次呼叫最后一次):
文件“/Library/Python/2.7/site packages/pip/basecommand.py”,第215行,在main中
status=self.run(选项、参数)
文件“/Library/Python/2.7/site packages/pip/commands/install.py”,第342行,运行中
prefix=options.prefix\u路径,
文件“/Library/Python/2.7/site packages/pip/req/req_set.py”,第778行,安装中
要求.卸载(自动确认=True)
文件“/Library/Python/2.7/site packages/pip/req/req_install.py”,第754行,在卸载中
路径到移除。移除(自动确认)
文件“/Library/Python/2.7/site packages/pip/req/req_uninstall.py”,删除中的第115行
重命名(路径,新路径)
文件“/Library/Python/2.7/site packages/pip/utils/_init__.py”,第267行,在重命名中
shutil.移动(旧、新)
文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第302行,移动中
副本2(src、real_dst)
copy2中的文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第131行
copystat(src、dst)
copystat中的文件“/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py”,第103行
os.chflags(dst、圣圣彼得堡旗帜)
OS错误:[Errno 1]不允许操作:'/var/folders/ws/yr231f3x1n3gh1lt85c0m4fm0000gn/T/pip-ViwdCl-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/Python/six-1.4.1-py2.7.egg-info'

您是否尝试过
sudo pip install ipython
sudo
前面的命令应授予您权限。如果没有,请尝试使用anaconda安装程序或PyCharm安装。。。他们会自动为您完成这项工作。我强烈建议您在所有python开发中安装并使用虚拟环境,这样您就不必拘泥于操作系统的版本。