Mac下安装ipython

执行

pip install ipython

一开始都很顺利,到后面报错

running install

running build

running build_py

creating build

creating build/lib.macosx-10.12-x86_64-2.7

copying scandir.py -> build/lib.macosx-10.12-x86_64-2.7

running build_ext

building '_scandir' extension

creating build/temp.macosx-10.12-x86_64-2.7

clang -fno-strict-aliasing -fno-common -dynamic -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c _scandir.c -o build/temp.macosx-10.12-x86_64-2.7/_scandir.o

You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.

error: command 'clang' failed with exit status 69

尝试使用sudo

sudo pip install ipython

还是一样的问题

看起来是xcode license的问题

sudo xcodebuild -license

根据提示敲回车,查看声明,然后根据提示输入agree 敲回车

接下来继续安装ipython

sudo pip install ipython

提示安装成功,现在可以使用ipython了


Mac下安装ipython_第1张图片

你可能感兴趣的:(Mac下安装ipython)