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了


最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容