Closed grjd closed 3 years ago
I got the following error while trying to install scikit-surprise . I also tried using conda install -c conda-forge scikit-surprise but there I get the error "PackagesNotFoundError:"
Python 3.9.2 ProductName: macOS ProductVersion: 11.2.3 BuildVersion: 20D91
% pip install scikit-surprise
ERROR: Command errored out with exit status 1: /Users/borri/miniforge3/envs/tf_env/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"'; file='"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-record-bc6nvd8q/install-record.txt --single-version-externally-managed --compile --install-headers /Users/borri/miniforge3/envs/tf_env/include/python3.8/scikit-surprise Check the logs for full command output.
Python 3.9.2 ProductName: macOS ProductVersion: 11.2.3
xcode-select --install solved the problem.
xcode-select --install
Thanks.
I got the following error while trying to install scikit-surprise . I also tried using conda install -c conda-forge scikit-surprise but there I get the error "PackagesNotFoundError:"
Python 3.9.2 ProductName: macOS ProductVersion: 11.2.3 BuildVersion: 20D91
% pip install scikit-surprise
Collecting scikit-surprise Using cached scikit-surprise-1.1.1.tar.gz (11.8 MB) Requirement already satisfied: joblib>=0.11 in ./miniforge3/envs/tf_env/lib/python3.8/site-packages (from scikit-surprise) (1.0.1) Requirement already satisfied: numpy>=1.11.2 in ./miniforge3/envs/tf_env/lib/python3.8/site-packages (from scikit-surprise) (1.20.1) Requirement already satisfied: scipy>=1.0.0 in ./miniforge3/envs/tf_env/lib/python3.8/site-packages (from scikit-surprise) (1.6.0) Requirement already satisfied: six>=1.10.0 in ./miniforge3/envs/tf_env/lib/python3.8/site-packages (from scikit-surprise) (1.15.0) Building wheels for collected packages: scikit-surprise Building wheel for scikit-surprise (setup.py) ... error ERROR: Command errored out with exit status 1: command: /Users/borri/miniforge3/envs/tf_env/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"'; file='"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-wheel-xgrz6nhb cwd: /private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/ Complete output (53 lines): running bdist_wheel running build running build_py creating build creating build/lib.macosx-11.0-arm64-3.8 creating build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/builtin_datasets.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/init.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/dump.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/dataset.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/reader.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/utils.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/trainset.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/accuracy.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/main.py -> build/lib.macosx-11.0-arm64-3.8/surprise creating build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/algo_base.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/knns.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/predictions.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/init.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/random_pred.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/baseline_only.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms creating build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/init.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/split.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/search.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/validation.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection running egg_info writing scikit_surprise.egg-info/PKG-INFO writing dependency_links to scikit_surprise.egg-info/dependency_links.txt writing entry points to scikit_surprise.egg-info/entry_points.txt writing requirements to scikit_surprise.egg-info/requires.txt writing top-level names to scikit_surprise.egg-info/top_level.txt reading manifest file 'scikit_surprise.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'scikit_surprise.egg-info/SOURCES.txt' copying surprise/similarities.c -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/similarities.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/prediction_algorithms/co_clustering.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/co_clustering.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/matrix_factorization.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/matrix_factorization.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/optimize_baselines.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/optimize_baselines.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/slope_one.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/slope_one.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms running build_ext building 'surprise.similarities' extension creating build/temp.macosx-11.0-arm64-3.8 creating build/temp.macosx-11.0-arm64-3.8/surprise gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/borri/miniforge3/envs/tf_env/include -arch arm64 -I/Users/borri/miniforge3/envs/tf_env/include -arch arm64 -I/Users/borri/miniforge3/envs/tf_env/lib/python3.8/site-packages/numpy/core/include -I/Users/borri/miniforge3/envs/tf_env/include/python3.8 -c surprise/similarities.c -o build/temp.macosx-11.0-arm64-3.8/surprise/similarities.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: Failed building wheel for scikit-surprise Running setup.py clean for scikit-surprise Failed to build scikit-surprise Installing collected packages: scikit-surprise Running setup.py install for scikit-surprise ... error ERROR: Command errored out with exit status 1: command: /Users/borri/miniforge3/envs/tf_env/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"'; file='"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-record-bc6nvd8q/install-record.txt --single-version-externally-managed --compile --install-headers /Users/borri/miniforge3/envs/tf_env/include/python3.8/scikit-surprise cwd: /private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/ Complete output (53 lines): running install running build running build_py creating build creating build/lib.macosx-11.0-arm64-3.8 creating build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/builtin_datasets.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/init.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/dump.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/dataset.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/reader.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/utils.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/trainset.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/accuracy.py -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/main.py -> build/lib.macosx-11.0-arm64-3.8/surprise creating build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/algo_base.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/knns.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/predictions.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/init.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/random_pred.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/baseline_only.py -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms creating build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/init.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/split.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/search.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection copying surprise/model_selection/validation.py -> build/lib.macosx-11.0-arm64-3.8/surprise/model_selection running egg_info writing scikit_surprise.egg-info/PKG-INFO writing dependency_links to scikit_surprise.egg-info/dependency_links.txt writing entry points to scikit_surprise.egg-info/entry_points.txt writing requirements to scikit_surprise.egg-info/requires.txt writing top-level names to scikit_surprise.egg-info/top_level.txt reading manifest file 'scikit_surprise.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'scikit_surprise.egg-info/SOURCES.txt' copying surprise/similarities.c -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/similarities.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise copying surprise/prediction_algorithms/co_clustering.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/co_clustering.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/matrix_factorization.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/matrix_factorization.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/optimize_baselines.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/optimize_baselines.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/slope_one.c -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms copying surprise/prediction_algorithms/slope_one.pyx -> build/lib.macosx-11.0-arm64-3.8/surprise/prediction_algorithms running build_ext building 'surprise.similarities' extension creating build/temp.macosx-11.0-arm64-3.8 creating build/temp.macosx-11.0-arm64-3.8/surprise gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/borri/miniforge3/envs/tf_env/include -arch arm64 -I/Users/borri/miniforge3/envs/tf_env/include -arch arm64 -I/Users/borri/miniforge3/envs/tf_env/lib/python3.8/site-packages/numpy/core/include -I/Users/borri/miniforge3/envs/tf_env/include/python3.8 -c surprise/similarities.c -o build/temp.macosx-11.0-arm64-3.8/surprise/similarities.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: /Users/borri/miniforge3/envs/tf_env/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"'; file='"'"'/private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-install-0w016vok/scikit-surprise/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /private/var/folders/n8/1wcp4hpx7l59gb45gfwr61p00000gn/T/pip-record-bc6nvd8q/install-record.txt --single-version-externally-managed --compile --install-headers /Users/borri/miniforge3/envs/tf_env/include/python3.8/scikit-surprise Check the logs for full command output.
Python 3.9.2 ProductName: macOS ProductVersion: 11.2.3