我试图在 Jupyter notebook 中使用我在另一篇文章中找到的命令 pip install bigfloat
pip install --global-option=build_ext --global-option="-I/usr/local/include" --global-option="-L/usr/local/lib" bigfloat
我确实相信 GMP 和 MPFR 已经安装,但尽管如此,我仍然会在下面的输出中看到错误消息。
/opt/anaconda3/lib/python3.7/site-packages/pip/_internal/commands/install.py:244: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options)
Collecting bigfloat
Using cached bigfloat-0.4.0.tar.gz (258 kB)
Requirement already satisfied: six in /opt/anaconda3/lib/python3.7/site-packages (from bigfloat) (1.16.0)
Skipping wheel build for bigfloat, due to binaries being disabled for it.
Installing collected packages: bigfloat
Running setup.py install for bigfloat ... error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7m/v9y34yln0bz8c0xg3jq3rwrm0000gn/T/pip-install-eeu8teff/bigfloat/setup.py'"'"'; __file__='"'"'/private/var/folders/7m/v9y34yln0bz8c0xg3jq3rwrm0000gn/T/pip-install-eeu8teff/bigfloat/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' build_ext -I/usr/local/include -L/usr/local/lib install --record /private/var/folders/7m/v9y34yln0bz8c0xg3jq3rwrm0000gn/T/pip-record-8jnneleu/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.7m/bigfloat
cwd: /private/var/folders/7m/v9y34yln0bz8c0xg3jq3rwrm0000gn/T/pip-install-eeu8teff/bigfloat/
Complete output (7 lines):
running build_ext
building 'mpfr' extension
creating build
creating build/temp.macosx-10.9-x86_64-3.7
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -I/usr/local/include -I/opt/anaconda3/include/python3.7m -c mpfr.c -o build/temp.macosx-10.9-x86_64-3.7/mpfr.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
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/anaconda3/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/7m/v9y34yln0bz8c0xg3jq3rwrm0000gn/T/pip-install-eeu8teff/bigfloat/setup.py'"'"'; __file__='"'"'/private/var/folders/7m/v9y34yln0bz8c0xg3jq3rwrm0000gn/T/pip-install-eeu8teff/bigfloat/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' build_ext -I/usr/local/include -L/usr/local/lib install --record /private/var/folders/7m/v9y34yln0bz8c0xg3jq3rwrm0000gn/T/pip-record-8jnneleu/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.7m/bigfloat Check the logs for full command output.
Note: you may need to restart the kernel to use updated packages.
我不熟悉分析诸如此类的错误消息,因此非常感谢您在此处解决我的问题的任何帮助。似乎是说我有一个无效的活动开发者路径,因为这个xrun丢失了。