Затем я попытался установить его глобально с помощью conda. И установил его в базовый каталог. Тем не менее, я не мог гарантировать, что он глобальный.
Я попробовал установить с помощью pip install scikit-surprise, а также pip install scikit-surprise==1.1.4, совместимой версии для python3. 12. Но потом я получаю эту ошибку.
Код: Выделить всё
(venv) PS A:\python\app19-movie-recommendation> pip install scikit-surprise==1.1.4
Collecting scikit-surprise==1.1.4
Using cached scikit_surprise-1.1.4.tar.gz (154 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: joblib>=1.2.0 in a:\python\app19-movie-recommendation\venv\lib\site-packages (from scikit-surprise==1.1.4) (1.4.2)
Requirement already satisfied: numpy>=1.19.5 in a:\python\app19-movie-recommendation\venv\lib\site-packages (from scikit-surprise==1.1.4) (2.1.1)
Requirement already satisfied: scipy>=1.6.0 in a:\python\app19-movie-recommendation\venv\lib\site-packages (from scikit-surprise==1.1.4) (1.14.1)
Building wheels for collected packages: scikit-surprise
Building wheel for scikit-surprise (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for scikit-surprise (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [115 lines of output]
running bdist_wheel
running build
running build_py
creating build\lib.win-amd64-cpython-312\surprise
copying surprise\accuracy.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\builtin_datasets.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\dataset.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\dump.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\reader.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\trainset.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\utils.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\__init__.py -> build\lib.win-amd64-cpython-312\surprise
copying surprise\__main__.py -> build\lib.win-amd64-cpython-312\surprise
creating build\lib.win-amd64-cpython-312\surprise\model_selection
copying surprise\model_selection\search.py -> build\lib.win-amd64-cpython-312\surprise\model_selection
copying surprise\model_selection\split.py -> build\lib.win-amd64-cpython-312\surprise\model_selection
copying surprise\model_selection\validation.py -> build\lib.win-amd64-cpython-312\surprise\model_selection
copying surprise\model_selection\__init__.py -> build\lib.win-amd64-cpython-312\surprise\model_selection
creating build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\algo_base.py -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\baseline_only.py -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\knns.py -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\predictions.py -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\random_pred.py -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\__init__.py -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
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
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayscalars.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarraytypes.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ufuncobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayscalars.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarraytypes.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ufuncobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayscalars.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarraytypes.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ufuncobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayscalars.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarraytypes.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ufuncobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\arrayscalars.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarrayobject.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ndarraytypes.h won't be automatically included in the manifest: the path must be relative
dependency C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\numpy\core\include\numpy\ufuncobject.h won't be automatically included in the manifest: the path must be relative
reading manifest file 'scikit_surprise.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*.so' found under directory 'surprise'
adding license file 'LICENSE.md'
writing manifest file 'scikit_surprise.egg-info\SOURCES.txt'
C:\Users\manoj\AppData\Local\Temp\pip-build-env-50yqjas6\overlay\Lib\site-packages\setuptools\command\build_py.py:218: _Warning: Package 'surprise.prediction_algorithms' is absent from the `packages` configuration.
!!
********************************************************************************
############################
# Package would be ignored #
############################
Python recognizes 'surprise.prediction_algorithms' as an importable package[^1],
but it is absent from setuptools' `packages` configuration.
This leads to an ambiguous overall configuration. If you want to distribute this
package, please make sure that 'surprise.prediction_algorithms' is explicitly added
to the `packages` configuration field.
Alternatively, you can also rely on setuptools' discovery methods
(for example by using `find_namespace_packages(...)`/`find_namespace:`
instead of `find_packages(...)`/`find:`).
You can read more about "package discovery" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/package_discovery.html
If you don't want 'surprise.prediction_algorithms' to be distributed and are
already explicitly excluding 'surprise.prediction_algorithms' via
`find_namespace_packages(...)/find_namespace` or `find_packages(...)/find`,
you can try to use `exclude_package_data`, or `include-package-data=False` in
combination with a more fine grained `package-data` configuration.
You can read more about "package data files" on setuptools documentation page:
- https://setuptools.pypa.io/en/latest/userguide/datafiles.html
[^1]: For Python, any directory (with suitable naming) can be imported,
even if it does not contain any `.py` files.
On the other hand, currently there is no concept of package data
directory, all directories are treated like packages.
********************************************************************************
!!
check.warn(importable)
copying surprise\similarities.c -> build\lib.win-amd64-cpython-312\surprise
copying surprise\similarities.pyx -> build\lib.win-amd64-cpython-312\surprise
copying surprise\prediction_algorithms\co_clustering.c -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\matrix_factorization.c -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\optimize_baselines.c -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\slope_one.c -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\co_clustering.pyx -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\matrix_factorization.pyx -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\optimize_baselines.pyx -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
copying surprise\prediction_algorithms\slope_one.pyx -> build\lib.win-amd64-cpython-312\surprise\prediction_algorithms
running build_ext
building 'surprise.similarities' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for scikit-surprise
Failed to build scikit-surprise
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (scikit-surprise)
Код: Выделить всё
conda install -c conda-forge scikit-surprise
Я также пробовал устанавливать различные версии в свой venv, нужно ли мне устанавливать устаревшие версии Python для работы? Я хочу работать в самом коде VS, не создавая никаких других файлов. Пожалуйста, дайте мне знать возможные решения.
Подробнее здесь: https://stackoverflow.com/questions/790 ... in-windows
Мобильная версия