Closed kwasiewicz002 closed 6 months ago
I meet the same problem. Details are as follows:
[!TIP]
See pdm-install-ws8fxpxf.log for more details.
distutils.errors.DistutilsError: Command '['D:\\Repository\\Python\\.venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel',
'--no-deps', '-w', 'C:\\Users\\DRAGON~1\\AppData\\Local\\Temp\\tmpstvtm6iq', '--quiet', 'numpy>=1.17.3']' returned non-zero exit status 1.
According to this DistutilsError
, it seems scikit-surprise
is looking for numpy>=1.17.3
. However, the current latest version of NumPy is v1.26.4
.
I think there may be some "mis-configured" properties of scikit-surprise
.
I meet the same problem. Details are as follows:
Environments
16:44:46 D:\...\Python 1ms pwsh> winget list Python 名称 ID 版本 源 ---------------------------------------------------------- Python Launcher Python.Launcher > 3.12.0 winget Python 3.12.2 (64-bit) Python.Python.3.12 3.12.2 winget 16:44:50 D:\...\Python 1.782s pwsh> python --version Python 3.12.2 16:44:54 D:\...\Python 29ms pwsh> pipx --version 1.4.3 16:44:58 D:\...\Python 403ms pwsh> pdm --version PDM, version 2.12.3 16:45:02 D:\...\Python 780ms pwsh> pdm list --tree numpy numpy 1.26.4 [ required: !=1.24.0,>=1.20&&<2,>=1.21&&<2,>=1.26.0&&<2.0,>=1.20&&>=1.20&&>=1.26.0 ] 16:46:00 D:\...\Python 2ms pwsh> systeminfo.exe OS 名称: Microsoft Windows 11 专业版 OS 版本: 10.0.22635 暂缺 Build 22635 OS 制造商: Microsoft Corporation OS 配置: 独立工作站 OS 构建类型: Multiprocessor Free 系统类型: x64-based PC 处理器: 安装了 1 个处理器。 [01]: Intel64 Family 6 Model 140 Stepping 1 GenuineIntel ~2803 Mhz
Console Logs
16:27:15 D:\...\Python 3ms pwsh> pdm add -d scikit-surprise Adding packages to dev dev-dependencies: scikit-surprise 🔒 Lock successful Changes are written to pyproject.toml. Synchronizing working set with resolved packages: 1 to add, 0 to update, 0 to remove ✖ Install scikit-surprise 1.1.3 failed Retry failed jobs ✖ Install scikit-surprise 1.1.3 failed ERRORS: add scikit-surprise failed: Traceback (most recent call last): File "D:\Applications\Python\cp312\Lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pdm\installers\synchronizers.py", line 286, in install_candidate self.manager.install(can) File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pdm\installers\manager.py", line 34, in install dist_info = installer(str(prepared.build()), self.environment, prepared.direct_url()) ^^^^^^^^^^^^^^^^ File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pdm\models\candidates.py", line 418, in build self.wheel = Path(builder.build(build_dir, metadata_directory=self._metadata_dir)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pdm\builders\wheel.py", line 26, in build requires = self._hook.get_requires_for_build_wheel(config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel return self._call_hook('get_requires_for_build_wheel', { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pyproject_hooks\_impl.py", line 311, in _call_hook self._subprocess_runner( File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pdm\builders\base.py", line 261, in subprocess_runner return log_subprocessor(cmd, cwd, extra_environ=env) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\Applications\Python\pipx\venvs\pdm\Lib\site-packages\pdm\builders\base.py", line 107, in log_subprocessor raise build_error(e) from None pdm.exceptions.BuildError: Build backend raised error: Showing the last 10 lines of the build output: ^^^^^^^^^^^^^^^ File "C:\Users\DRAGON~1\AppData\Local\Temp\pdm-build-env-l9_oswgu-shared\Lib\site-packages\pkg_resources\__init__.py", line 1119, in best_match return self.obtain(req, installer) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DRAGON~1\AppData\Local\Temp\pdm-build-env-l9_oswgu-shared\Lib\site-packages\pkg_resources\__init__.py", line 1130, in obtain return installer(requirement) if installer else None ^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\DRAGON~1\AppData\Local\Temp\pdm-build-env-l9_oswgu-shared\Lib\site-packages\setuptools\installer.py", line 103, in _fetch_build_egg_no_warn raise DistutilsError(str(e)) from e distutils.errors.DistutilsError: Command '['D:\\Repository\\Python\\.venv\\Scripts\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\DRAGON~1\\AppData\\Local\\Temp\\tmpstvtm6iq', '--quiet', 'numpy>=1.17.3']' returned non-zero exit status 1. See C:\Users\DRAGON~1\AppData\Local\Temp\pdm-install-ws8fxpxf.log for detailed debug log. [InstallationError]: Some package operations are not complete yet WARNING: Add '-v' to see the detailed traceback
Tip
See pdm-install-ws8fxpxf.log for more details.
Do you managed to solve this? I tried to install Surprise using Poetry but I got similar errors. I assumed that on PDM it would fail as well, as both expects the PEP 517 (I guess...).
Nope ... I can't solve it on my own. 😞
Installing scikit-surprise
in Python v3.12.2 will get different outputs with/without PEP 517.
@William-Fernandes252 - I MADE IT!!! 🎉
Cython
is required of this package when installing via pip
without PEP 517, but it doesn't included in packages configurations. I also seems scikit-surprise
does not compatible with PEP 517. I don't know if poetry
can provide such switch for users, but pdm
provides a --no-isolation
switch to bypass this unexpected bug. scikit-surprise
requires joblib
numpy
and scipy
as dependencies, just pdm add
them on your own before adding scikit-surprise
with --no-isolation
.
You can try installing with pip
directly without PEP 517. Please follow steps below
pip
, without PEP 517pip
, with PEP 517pdm
pdm
, with --no-isolation
I'm also unable to install this package using Poetry (thus with no direct control on PEP 517)
@RubTalha @bbelescot @Dragon1573 @William-Fernandes252 @kwasiewicz002 can you test the change done in #476 by @abhi8893 by doing this:
pip install git+https://github.com/abhi8893/Surprise@implement-pyproject-pkging
Pull request #476 verified 🎉
19:40:39 D:\...\Python 31ms pwsh> conda activate .\.venv\
19:40:44 (Python) D:\...\Python 294ms pwsh> python -m pip install git+https://github.com/abhi8893/Surprise@implement-pyproject-pkging
Looking in indexes: https://mirrors.bfsu.edu.cn/pypi/web/simple
Collecting git+https://github.com/abhi8893/Surprise@implement-pyproject-pkging
Cloning https://github.com/abhi8893/Surprise (to revision implement-pyproject-pkging) to c:\users\dragon1573\appdata\local\temp\pip-req-build-hh5cjsgr
Running command git clone --filter=blob:none --quiet https://github.com/abhi8893/Surprise 'C:\Users\Dragon1573\AppData\Local\Temp\pip-req-build-hh5cjsgr'
Running command git checkout -b implement-pyproject-pkging --track origin/implement-pyproject-pkging
branch 'implement-pyproject-pkging' set up to track 'origin/implement-pyproject-pkging'.
Switched to a new branch 'implement-pyproject-pkging'
Resolved https://github.com/abhi8893/Surprise to commit 9c7dbc856b7d0b38cc8738b6594fe34f7b20d261
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting joblib>=1.0.0 (from scikit-surprise==1.1.4)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/91/29/df4b9b42f2be0b623cbd5e2140cafcaa2bef0759a00b7b70104dcfe2fb51/joblib-1.4.2-py3-none-any.whl (301 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 301.8/301.8 kB 1.7 MB/s eta 0:00:00
Requirement already satisfied: numpy>=1.17.3 in d:\repository\python\.venv\lib\site-packages (from scikit-surprise==1.1.4) (1.26.4)
Collecting scipy>=1.3.2 (from scikit-surprise==1.1.4)
Downloading https://mirrors.bfsu.edu.cn/pypi/web/packages/d4/a1/d4adf25b6d2bef8d0ad1682829dcfcba97f3f96bb5b6f137bc3e41003cc7/scipy-1.13.0-cp311-cp311-win_amd64.whl (46.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.2/46.2 MB 11.5 MB/s eta 0:00:00
Building wheels for collected packages: scikit-surprise
Building wheel for scikit-surprise (pyproject.toml) ... done
Created wheel for scikit-surprise: filename=scikit_surprise-1.1.4-cp311-cp311-win_amd64.whl size=1401108 sha256=ac13b0ee2a2be597053d7ee32669771b2c5ed6f5f67eaa0bcdfe9fca71dbe55b
Stored in directory: C:\Users\Dragon1573\AppData\Local\Temp\pip-ephem-wheel-cache-ha7m9dd3\wheels\50\fe\33\4ea0cbc6aa99037dfac412e2445f3cc849bb41f824606f654b
Successfully built scikit-surprise
Installing collected packages: scipy, joblib, scikit-surprise
Successfully installed joblib-1.4.2 scikit-surprise-1.1.4 scipy-1.13.0
19:42:12 (Python) D:\...\Python 1m 14.059s pwsh> python --version
Python 3.11.9
19:42:43 (Python) D:\...\Python 27ms pwsh> python -c "from sys import version; print(version)"
3.11.9 | packaged by conda-forge | (main, Apr 19 2024, 18:27:10) [MSC v.1938 64 bit (AMD64)]
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.
Description
I wanted to move my codebase to python 3.12, but I can't do it due to the surprise apparently not being compatible with it. Is there any chance that it becomes compatible anytime soon?
Actual Results
Versions
python 3.12.1 linux 6.5.11 scikit-surprise 1.1.3