Mac Python3使用pip3 安装模块时出错

当前问题尚未解决

执行命令pip3 install pyhanlp,报错:

/usr/bin/clang -fno-strict-aliasing -Wsign-compare -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch i386 -arch x86_64 -g -DMACOSX=1 -DHAVE_NUMPY=1 -Inative/common/include -Inative/python/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home/include/darwin -I/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -c native/python/jpype_python.cpp -o build/temp.macosx-10.6-intel-3.6/native/python/jpype_python.o -ggdb
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command ‘/usr/bin/clang’ failed with exit status 1

网上查了一下,提示安装xcode的,于是执行:

xcode-select --install

下载安装Xcode,但是找不到程序在哪里。
再次执行pip3 install pyhanlp,继续报错:

warning: include path for stdlibc++ headers not found; pass ‘-std=libc++’ on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
In file included from native/python/jpype_python.cpp:19:
In file included from native/python/include/jpype_python.h:24:
native/common/include/jpype.h:107:10: fatal error: ‘map’ file not found
#include
^~~~~
1 warning and 1 error generated.
error: command ‘/usr/bin/clang’ failed with exit status 1

此时命令行显示xcode已安装:

chenqiuruideMacBook-Air:~ chenqiurui$ xcode-select --print-path
/Library/Developer/CommandLineTools

后面继续查安装hanlp包出错的解决办法,提示需要先安装jpype,于是下载后执行 pipi3 install jpype,报错与当前平台不兼容。。。因为网上的jpype.whl文件都是win系统下的,不知道Mac下面应该怎么安装??

你可能感兴趣的:(Python)