NicolasHug / Surprise

A Python scikit for building and analyzing recommender systems
http://surpriselib.com
BSD 3-Clause "New" or "Revised" License
6.28k stars 1k forks source link

Couldn't install Surprise in windows #468

Closed srkpriyanka95 closed 2 months ago

srkpriyanka95 commented 1 year ago

Description

Steps/Code to Reproduce

pip install surprise Collecting surprise Using cached surprise-0.1-py2.py3-none-any.whl (1.8 kB) Collecting scikit-surprise (from surprise) Using cached scikit-surprise-1.1.3.tar.gz (771 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: joblib>=1.0.0 in c:\users\priyanka\appdata\local\programs\python\python311\lib\site-packages (from scikit-surprise->surprise) (1.2.0) Requirement already satisfied: numpy>=1.17.3 in c:\users\priyanka\appdata\local\programs\python\python311\lib\site-packages (from scikit-surprise->surprise) (1.24.3) Requirement already satisfied: scipy>=1.3.2 in c:\users\priyanka\appdata\local\programs\python\python311\lib\site-packages (from scikit-surprise->surprise) (1.10.1) Building wheels for collected packages: scikit-surprise Building wheel for scikit-surprise (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [101 lines of output] C:\Users\priyanka\AppData\Local\Temp\pip-install-izybxr84\scikit-surprise_cd621f89a5ec46be8e2a02e19dbb68fb\setup.py:65: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !! ******************************************************************************** Requirements should be satisfied by a PEP 517 installer. If you are using pip, you can try `pip install --use-pep517`. ******************************************************************************** !! dist.Distribution().fetch_build_eggs(["numpy>=1.17.3"]) running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\surprise copying surprise\accuracy.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\builtin_datasets.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\dataset.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\dump.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\reader.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\trainset.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\utils.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\__init__.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\__main__.py -> build\lib.win-amd64-cpython-311\surprise creating build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\search.py -> build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\split.py -> build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\validation.py -> build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\__init__.py -> build\lib.win-amd64-cpython-311\surprise\model_selection creating build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\algo_base.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\baseline_only.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\knns.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\predictions.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\random_pred.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\__init__.py -> build\lib.win-amd64-cpython-311\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 reading manifest file 'scikit_surprise.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE.md' writing manifest file 'scikit_surprise.egg-info\SOURCES.txt' C:\Users\priyanka\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\build_py.py:201: _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-311\surprise copying surprise\similarities.pyx -> build\lib.win-amd64-cpython-311\surprise copying surprise\prediction_algorithms\co_clustering.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\matrix_factorization.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\optimize_baselines.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\slope_one.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\co_clustering.pyx -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\matrix_factorization.pyx -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\optimize_baselines.pyx -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\slope_one.pyx -> build\lib.win-amd64-cpython-311\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 Running setup.py clean for scikit-surprise Failed to build scikit-surprise ERROR: Could not build wheels for scikit-surprise, which is required to install pyproject.toml-based projects #### Expected Results #### Actual Results #### Versions windows : Windows-10-10.0.22621-SP0 Python: Python 3.11.3
SexyHotMamma commented 1 year ago

Thank you 😊

Sent from Yahoo Mail on Android

On Tue, May 16, 2023 at 8:03 AM, @.***> wrote:

Description

Steps/Code to Reproduce pip install surprise Collecting surprise Using cached surprise-0.1-py2.py3-none-any.whl (1.8 kB) Collecting scikit-surprise (from surprise) Using cached scikit-surprise-1.1.3.tar.gz (771 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: joblib>=1.0.0 in c:\users\priyanka\appdata\local\programs\python\python311\lib\site-packages (from scikit-surprise->surprise) (1.2.0) Requirement already satisfied: numpy>=1.17.3 in c:\users\priyanka\appdata\local\programs\python\python311\lib\site-packages (from scikit-surprise->surprise) (1.24.3) Requirement already satisfied: scipy>=1.3.2 in c:\users\priyanka\appdata\local\programs\python\python311\lib\site-packages (from scikit-surprise->surprise) (1.10.1) Building wheels for collected packages: scikit-surprise Building wheel for scikit-surprise (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [101 lines of output] C:\Users\priyanka\AppData\Local\Temp\pip-install-izybxr84\scikit-surprise_cd621f89a5ec46be8e2a02e19dbb68fb\setup.py:65: _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated. !!


      Requirements should be satisfied by a PEP 517 installer.
      If you are using pip, you can try `pip install --use-pep517`.
      ********************************************************************************

!! dist.Distribution().fetch_build_eggs(["numpy>=1.17.3"]) running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\surprise copying surprise\accuracy.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\builtin_datasets.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\dataset.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\dump.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\reader.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\trainset.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\utils.py -> build\lib.win-amd64-cpython-311\surprise copying surprise__init.py -> build\lib.win-amd64-cpython-311\surprise copying surprise\main.py -> build\lib.win-amd64-cpython-311\surprise creating build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\search.py -> build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\split.py -> build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\validation.py -> build\lib.win-amd64-cpython-311\surprise\model_selection copying surprise\model_selection\init.py -> build\lib.win-amd64-cpython-311\surprise\model_selection creating build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\algo_base.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\baseline_only.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\knns.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\predictions.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\random_pred.py -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\init__.py -> build\lib.win-amd64-cpython-311\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 reading manifest file 'scikit_surprise.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' adding license file 'LICENSE.md' writing manifest file 'scikit_surprise.egg-info\SOURCES.txt' C:\Users\priyanka\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\build_py.py:201: _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-311\surprise copying surprise\similarities.pyx -> build\lib.win-amd64-cpython-311\surprise copying surprise\prediction_algorithms\co_clustering.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\matrix_factorization.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\optimize_baselines.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\slope_one.c -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\co_clustering.pyx -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\matrix_factorization.pyx -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\optimize_baselines.pyx -> build\lib.win-amd64-cpython-311\surprise\prediction_algorithms copying surprise\prediction_algorithms\slope_one.pyx -> build\lib.win-amd64-cpython-311\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 Running setup.py clean for scikit-surprise Failed to build scikit-surprise ERROR: Could not build wheels for scikit-surprise, which is required to install pyproject.toml-based projects

Expected Results

Actual Results

Versions windows : Windows-10-10.0.22621-SP0 Python: Python 3.11.3

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

Tjorriemorrie commented 1 year ago

I'm also not able to install it via pypi.

Also checking it out and running install gives the error: 'surprise/similarities.c': No such file or directory

Tjorriemorrie commented 1 year ago

I managed to get 1.1.3 installed using

python -m pip install --upgrade pip setuptools wheel
python -m pip install --no-use-pep517 scikit-surprise

win11 py3.11

ilankhirin commented 7 months ago

I managed to get 1.1.3 installed using

python -m pip install --upgrade pip setuptools wheel
python -m pip install --no-use-pep517 scikit-surprise

win11 py3.11

God bless you

juanbretti commented 5 months ago

win11 py3.11

Sadly, does not work for me.

NicolasHug commented 2 months ago

Hi all, thanks for the report. This should be fixed with the v1.1.4 that I just released today. I'll close this issue but please open another one if you are still experiencing installation issues.