繁体   English   中英

在 Mac 上安装 pip

[英]pip install in a mac

我试图安装我在 Windows 中所做的项目的依赖项。 但是每次它都会抱怨 nltk 的依赖项,尤其是正则表达式。 我正在尝试在 python 3.7.5 的虚拟环境中做。

Complete output (17 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.11-x86_64-3.7
creating build/lib.macosx-10.11-x86_64-3.7/regex
copying regex_3/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/regex
copying regex_3/regex.py -> build/lib.macosx-10.11-x86_64-3.7/regex
copying regex_3/_regex_core.py -> build/lib.macosx-10.11-x86_64-3.7/regex
copying regex_3/test_regex.py -> build/lib.macosx-10.11-x86_64-3.7/regex
running build_ext
building 'regex._regex' extension
creating build/temp.macosx-10.11-x86_64-3.7
creating build/temp.macosx-10.11-x86_64-3.7/regex_3
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/include -I/usr/local/opt/openssl@1.1/include -I/usr/local/opt/sqlite/include -I/Users/Rogerio/Documents/Projects/iagreeaidjangoapikey/env/include -I/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c regex_3/_regex.c -o build/temp.macosx-10.11-x86_64-3.7/regex_3/_regex.o
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
error: command 'clang' failed with exit status 1

xcode-select --install

执行此命令后,这将在您的系统上更新或安装 clang。

更新后有问题吗? 那么你的开发者路径没有设置。

如果你有 XCODE 然后设置你需要的路径

  1. 转到 Xcode 中的首选项

转到 xcode 中的首选项

  1. 转到位置选项卡

转到位置选项卡

  1. 从下拉列表中选择命令行工具版本

选择命令行工具版本

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM