mac下pip install pyahocorasick报错

mac下pip install pyahocorasick报错,下载pyahocorasick-1.4.0.tar.gz压缩文件,加压,终端运行python setup.py install

报错
running install
running bdist_egg
running egg_info
writing pyahocorasick.egg-info/PKG-INFO
writing dependency_links to pyahocorasick.egg-info/dependency_links.txt
writing top-level names to pyahocorasick.egg-info/top_level.txt
reading manifest file ‘pyahocorasick.egg-info/SOURCES.txt’
reading manifest template ‘MANIFEST.in’
warning: no files found matching ‘travis.yml’
writing manifest file ‘pyahocorasick.egg-info/SOURCES.txt’
installing library code to build/bdist.macosx-10.7-x86_64/egg
running install_lib
running build_ext
building ‘ahocorasick’ extension
creating build
creating build/temp.macosx-10.7-x86_64-3.7
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/a542/anaconda3/include -arch x86_64 -I/Users/a542/anaconda3/include -arch x86_64 -DAHOCORASICK_UNICODE= -I/Users/a542/anaconda3/include/python3.7m -c pyahocorasick.c -o build/temp.macosx-10.7-x86_64-3.7/pyahocorasick.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command ‘gcc’ failed with exit status 1

运行xcode-select --install安装xcode
再运行python setup.py install
ok了

发布了3 篇原创文章 · 获赞 0 · 访问量 20

猜你喜欢

转载自blog.csdn.net/qq_38101208/article/details/105171460