Hi, I am a new user to Python and I am learning about PDP recently.
I tried the pip install pdpbox commend on my Jupyter notebook, and I got this very very very long error message (warning ahead). I would greatly appreciate all suggestions/help on how to solve this problem. Thank you!
I tried: relaunch Jupyter
I tried: the pip install -U pip setuptools command, yet that ended with another error message.
Thanks again!
The error code are as below:
Building wheels for collected packages: matplotlib
Building wheel for matplotlib (setup.py) β¦ error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -u -c βimport io, os, sys, setuptools, tokenize; sys.argv[0] = β"β"β/private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/setup.pyβ"β"β; file=β"β"β/private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/setup.pyβ"β"β;f = getattr(tokenize, β"β"βopenβ"β"β, open)(file) if os.path.exists(file) else io.StringIO(β"β"βfrom setuptools import setup; setup()β"β"β);code = f.read().replace(β"β"β\r\nβ"β"β, β"β"β\nβ"β"β);f.close();exec(compile(code, file, β"β"βexecβ"β"β))β bdist_wheel -d /private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-wheel-89pb522e
cwd: /private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/
Complete output (505 lines):
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.8 (default, Apr 13 2021, 12:59:45) [Clang 10.0.0 ]]
platform: yes [darwin]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl/Tk]
macosx: yes [installing, darwin]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
error: command βgccβ failed with exit status 1
ERROR: Failed building wheel for matplotlib
Running setup.py clean for matplotlib
Failed to build matplotlib
Installing collected packages: matplotlib, pdpbox
Attempting uninstall: matplotlib
Found existing installation: matplotlib 3.3.4
Uninstalling matplotlib-3.3.4:
Successfully uninstalled matplotlib-3.3.4
Running setup.py install for matplotlib β¦ error
ERROR: Command errored out with exit status 1:
command: /opt/anaconda3/bin/python -u -c βimport io, os, sys, setuptools, tokenize; sys.argv[0] = β"β"β/private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/setup.pyβ"β"β; file=β"β"β/private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/setup.pyβ"β"β;f = getattr(tokenize, β"β"βopenβ"β"β, open)(file) if os.path.exists(file) else io.StringIO(β"β"βfrom setuptools import setup; setup()β"β"β);code = f.read().replace(β"β"β\r\nβ"β"β, β"β"β\nβ"β"β);f.close();exec(compile(code, file, β"β"βexecβ"β"β))β install --record /private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-record-249eq8ll/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/matplotlib
cwd: /private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/
Complete output (505 lines):
IMPORTANT WARNING:
pkg-config is not installed.
matplotlib may not be able to find some of its dependencies
================================================================================
Edit setup.cfg to change the build options
BUILDING MATPLOTLIB
matplotlib: yes [3.1.1]
python: yes [3.8.8 (default, Apr 13 2021, 12:59:45) [Clang 10.0.0 ]]
platform: yes [darwin]
OPTIONAL SUBPACKAGES
sample_data: yes [installing]
tests: no [skipping due to configuration]
OPTIONAL BACKEND EXTENSIONS
agg: yes [installing]
tkagg: yes [installing; run-time loading from Python Tcl/Tk]
macosx: yes [installing, darwin]
OPTIONAL PACKAGE DATA
dlls: no [skipping due to configuration]
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/opt/anaconda3/include -arch x86_64 -I/opt/anaconda3/include -arch x86_64 -DFREETYPE_BUILD_TYPE=system -DPY_ARRAY_UNIQUE_SYMBOL=MPL_matplotlib_ft2font_ARRAY_API -DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION -D__STDC_FORMAT_MACROS=1 -Iextern/agg24-svn/include -I/opt/anaconda3/lib/python3.8/site-packages/numpy/core/include -I/opt/anaconda3/include/python3.8 -c src/checkdep_freetype2.c -o build/temp.macosx-10.9-x86_64-3.8/src/checkdep_freetype2.o -I/opt/anaconda3/include/freetype2
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 io, os, sys, setuptools, tokenize; sys.argv[0] = β"β"β/private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/setup.pyβ"β"β; file=β"β"β/private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-install-_a_ey__7/matplotlib_53c01178919f4685aa0b52f2a3252920/setup.pyβ"β"β;f = getattr(tokenize, β"β"βopenβ"β"β, open)(file) if os.path.exists(file) else io.StringIO(β"β"βfrom setuptools import setup; setup()β"β"β);code = f.read().replace(β"β"β\r\nβ"β"β, β"β"β\nβ"β"β);f.close();exec(compile(code, file, β"β"βexecβ"β"β))β install --record /private/var/folders/76/jw56v3017c7c5k0mkwn3s0fh0000gn/T/pip-record-249eq8ll/install-record.txt --single-version-externally-managed --compile --install-headers /opt/anaconda3/include/python3.8/matplotlib Check the logs for full command output.