surprise 패키지는 추천시스템(Recommender System)을
구축하고 평가하고 배포할 수 있게 해주는 라이브러리이다.
현재까지 추천시스템에 대한 연구에 많이 쓰인 Movielens와
Jester데이터 셋을 제공해주고, 예측 알고리즘, SVD, 유사도, CV 등
여러가지 메소드를 함께 제공해준다
그런데 이 녀석을 사용하려고 하는데 무슨 오류인지 설치가 되지 않았다
Building wheels for collected packages: scikit-surprise
Building wheel for scikit-surprise (setup.py): started
Building wheel for scikit-surprise (setup.py): finished with status 'error'
Running setup.py clean for scikit-surprise
Failed to build scikit-surprise
Installing collected packages: scikit-surprise, surprise
Running setup.py install for scikit-surprise: started
Running setup.py install for scikit-surprise: finished with status 'error'
해결법 1) pip 업그레이드
python -m pip install --upgrade pip
pip --upgrade setuptools
surprise 버전이 현재 내 개발환경 버전과 맞지 않을 수도 있어서 업그레이드를 해줬다
검색해보니 python 3.6~3.9버전은 모두 surprise의 가장 최신 버전인 1.1.1과
모두 호환이 되는 것으로 나타나, pip 업그레이드 방법은 기각
해결법 2) Anaconda prompt에서 커맨드
이때까지는 모두 window shell 아니면, Jupyter Notebook에서
바로 패키지를 설치하곤 했다.
에러의 마지막 줄을 보면
Running setup.py install for scikit-surprise: finished with status 'error'
setup.py에서 오류가 난 것을 볼 수 있는데
Anaconda Prompt에서 관리자 권한으로 설치하면
권한 상으로 생기는 에러를 만들지 않지 않을까하였다
사용자 권한 prompt
conda install -c conda-forge scikit-surprise
을 그대로 커맨딩하면 역시 쓰기권한 오류가 나온다
그냥 파일을 만들 수 없다는 말이다
관리자 권한 prompt
(base) C:\Windows\system32>conda install -c conda-forge scikit-surprise
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.10.3
latest version: 23.1.0
Please update conda by running
$ conda update -n base -c defaults conda
## Package Plan ##
environment location: C:\ProgramData\Anaconda3
added / updated specs:
- scikit-surprise
The following NEW packages will be INSTALLED:
python_abi conda-forge/win-64::python_abi-3.9-2_cp39
scikit-surprise conda-forge/win-64::scikit-surprise-1.1.1-py39h5d4886f_2
The following packages will be UPDATED:
conda pkgs/main::conda-4.10.3-py39haa95532_0 --> conda-forge::conda-4.12.0-py39hcbf5309_0
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
이렇게 하니 설치가 잘된다
import가 완료된 저 셀을 얼마나 보고싶었는데
다음에 또 요상한 에러 갖고오면 가만안둔다~