[GH-ISSUE #335] windows下运行报错 #216

Closed
opened 2026-10-29 14:35:58 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @qihang518887 on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/335

#147 等在Windows下运行提示“TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'”
是因为在doc中并未提到“https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#pip-wheels”,Windows下在python中调用cuda需要使用pip-wheels提到的方法安装cuda

Originally created by @qihang518887 on GitHub (Feb 15, 2025). Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/335 #147 等在Windows下运行提示“TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'” 是因为在doc中并未提到“https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html#pip-wheels”,Windows下在python中调用cuda需要使用pip-wheels提到的方法安装cuda
bsakaguchi 2026-10-29 14:35:58 +00:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@qihang518887 commented on GitHub (Feb 15, 2025):

在我使用pip-wheels之后出现了新的报错

Created wheel for fire: filename=fire-0.7.0-py3-none-any.whl size=114318 sha256=1541d325af84ca394af953f56b5fc463bcaef1d4392e6a87495ace5bca6fd86f
Stored in directory: C:\Users\qh\AppData\Local\Temp\pip-ephem-wheel-cache-oc3au5b2\wheels\92\61\3f\600cf4d91dac9f979f4648ca6db99ed6d9fc762abc6f06b2b5
Building wheel for tokenizers (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for tokenizers (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [103 lines of output]
Running maturin pep517 build-wheel -i C:\Users\qh\AppData\Local\Programs\Python\Python313\python.exe --compatibility off
鈿狅笍 Warning: project.version field is required in pyproject.toml unless it is present in the project.dynamic list
馃嵐 Building a mixed python/rust project
馃敆 Found pyo3 bindings
馃悕 Found CPython 3.13 at C:\Users\qh\AppData\Local\Programs\Python\Python313\python.exe
馃摗 Using build options features, bindings from pyproject.toml
Compiling proc-macro2 v1.0.81
Compiling unicode-ident v1.0.12
Compiling autocfg v1.2.0
Compiling target-lexicon v0.12.14
Compiling windows_x86_64_msvc v0.52.5
Compiling once_cell v1.19.0
Compiling libc v0.2.153
Compiling cfg-if v1.0.0
Compiling crossbeam-utils v0.8.19
Compiling memchr v2.7.2
Compiling cc v1.0.94
Compiling fnv v1.0.7
Compiling strsim v0.10.0
Compiling windows_x86_64_msvc v0.48.5
Compiling ident_case v1.0.1
Compiling serde v1.0.198
Compiling smallvec v1.13.2
Compiling portable-atomic v1.6.0
Compiling parking_lot_core v0.9.9
Compiling either v1.11.0
Compiling regex-syntax v0.8.3
Compiling windows-targets v0.52.5
Compiling pkg-config v0.3.30
Compiling rayon-core v1.12.1
Compiling windows-sys v0.52.0
Compiling windows-targets v0.48.5
Compiling getrandom v0.2.14
Compiling paste v1.0.14
Compiling heck v0.4.1
Compiling scopeguard v1.2.0
Compiling num-traits v0.2.18
Compiling lock_api v0.4.11
Compiling memoffset v0.9.1
Compiling matrixmultiply v0.3.8
Compiling rand_core v0.6.4
Compiling aho-corasick v1.1.3
Compiling unicode-width v0.1.11
Compiling quote v1.0.36
Compiling crossbeam-epoch v0.9.18
Compiling log v0.4.21
Compiling syn v2.0.60
Compiling pyo3-build-config v0.21.2
Compiling lazy_static v1.4.0
Compiling utf8parse v0.2.1
Compiling thiserror v1.0.58
Compiling crossbeam-deque v0.8.5
Compiling anstyle v1.0.6
Compiling rawpointer v0.2.1
Compiling encode_unicode v0.3.6
Compiling serde_json v1.0.116
Compiling minimal-lexical v0.2.1
Compiling ppv-lite86 v0.2.17
Compiling anstyle-parse v0.2.3
Compiling parking_lot v0.12.1
Compiling nom v7.1.3
Compiling console v0.15.8
Compiling anstyle-query v1.0.2
Compiling anstyle-wincon v3.0.2
Compiling rand_chacha v0.3.1
Compiling rayon v1.10.0
Compiling num-integer v0.1.46
Compiling num-complex v0.4.5
Compiling itertools v0.11.0
Compiling onig_sys v69.8.1
Compiling esaxx-rs v0.1.10
Compiling regex-automata v0.4.6
Compiling colorchoice v1.0.0
Compiling macro_rules_attribute-proc_macro v0.2.0
Compiling ryu v1.0.17
Compiling bitflags v1.3.2
Compiling pyo3-ffi v0.21.2
Compiling pyo3 v0.21.2
Compiling itoa v1.0.11
Compiling base64 v0.13.1
Compiling indoc v2.0.5
Compiling unindent v0.2.3
error: failed to run custom build command for pyo3-ffi v0.21.2

  Caused by:
    process didn't exit successfully: `C:\Users\qh\AppData\Local\Temp\pip-install-zywhl7jb\tokenizers_44d935908006471fa654112c30249054\bindings\python\target\release\build\pyo3-ffi-c41952f64d2d7b3d\build-script-build` (exit code: 1)
    --- stdout
    cargo:rerun-if-env-changed=PYO3_CROSS
    cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR
    cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION
    cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION
    cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG
    cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY

    --- stderr
    error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12)
    = help: please check if an updated version of PyO3 is available. Current version: 0.21.2
    = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI
  warning: build failed, waiting for other jobs to finish...
  馃挜 maturin failed
    Caused by: Failed to build a native library through cargo
    Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "C:\\Users\\qh\\AppData\\Local\\Temp\\pip-install-zywhl7jb\\tokenizers_44d935908006471fa654112c30249054\\bindings\\python\\Cargo.toml" "--release" "--lib"`
  Error: command ['maturin', 'pep517', 'build-wheel', '-i', 'C:\\Users\\qh\\AppData\\Local\\Programs\\Python\\Python313\\python.exe', '--compatibility', 'off'] returned non-zero exit status 1
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for tokenizers

<!-- gh-comment-id:2660985288 --> @qihang518887 commented on GitHub (Feb 15, 2025): 在我使用pip-wheels之后出现了新的报错 Created wheel for fire: filename=fire-0.7.0-py3-none-any.whl size=114318 sha256=1541d325af84ca394af953f56b5fc463bcaef1d4392e6a87495ace5bca6fd86f Stored in directory: C:\Users\qh\AppData\Local\Temp\pip-ephem-wheel-cache-oc3au5b2\wheels\92\61\3f\600cf4d91dac9f979f4648ca6db99ed6d9fc762abc6f06b2b5 Building wheel for tokenizers (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for tokenizers (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [103 lines of output] Running `maturin pep517 build-wheel -i C:\Users\qh\AppData\Local\Programs\Python\Python313\python.exe --compatibility off` 鈿狅笍 Warning: `project.version` field is required in pyproject.toml unless it is present in the `project.dynamic` list 馃嵐 Building a mixed python/rust project 馃敆 Found pyo3 bindings 馃悕 Found CPython 3.13 at C:\Users\qh\AppData\Local\Programs\Python\Python313\python.exe 馃摗 Using build options features, bindings from pyproject.toml Compiling proc-macro2 v1.0.81 Compiling unicode-ident v1.0.12 Compiling autocfg v1.2.0 Compiling target-lexicon v0.12.14 Compiling windows_x86_64_msvc v0.52.5 Compiling once_cell v1.19.0 Compiling libc v0.2.153 Compiling cfg-if v1.0.0 Compiling crossbeam-utils v0.8.19 Compiling memchr v2.7.2 Compiling cc v1.0.94 Compiling fnv v1.0.7 Compiling strsim v0.10.0 Compiling windows_x86_64_msvc v0.48.5 Compiling ident_case v1.0.1 Compiling serde v1.0.198 Compiling smallvec v1.13.2 Compiling portable-atomic v1.6.0 Compiling parking_lot_core v0.9.9 Compiling either v1.11.0 Compiling regex-syntax v0.8.3 Compiling windows-targets v0.52.5 Compiling pkg-config v0.3.30 Compiling rayon-core v1.12.1 Compiling windows-sys v0.52.0 Compiling windows-targets v0.48.5 Compiling getrandom v0.2.14 Compiling paste v1.0.14 Compiling heck v0.4.1 Compiling scopeguard v1.2.0 Compiling num-traits v0.2.18 Compiling lock_api v0.4.11 Compiling memoffset v0.9.1 Compiling matrixmultiply v0.3.8 Compiling rand_core v0.6.4 Compiling aho-corasick v1.1.3 Compiling unicode-width v0.1.11 Compiling quote v1.0.36 Compiling crossbeam-epoch v0.9.18 Compiling log v0.4.21 Compiling syn v2.0.60 Compiling pyo3-build-config v0.21.2 Compiling lazy_static v1.4.0 Compiling utf8parse v0.2.1 Compiling thiserror v1.0.58 Compiling crossbeam-deque v0.8.5 Compiling anstyle v1.0.6 Compiling rawpointer v0.2.1 Compiling encode_unicode v0.3.6 Compiling serde_json v1.0.116 Compiling minimal-lexical v0.2.1 Compiling ppv-lite86 v0.2.17 Compiling anstyle-parse v0.2.3 Compiling parking_lot v0.12.1 Compiling nom v7.1.3 Compiling console v0.15.8 Compiling anstyle-query v1.0.2 Compiling anstyle-wincon v3.0.2 Compiling rand_chacha v0.3.1 Compiling rayon v1.10.0 Compiling num-integer v0.1.46 Compiling num-complex v0.4.5 Compiling itertools v0.11.0 Compiling onig_sys v69.8.1 Compiling esaxx-rs v0.1.10 Compiling regex-automata v0.4.6 Compiling colorchoice v1.0.0 Compiling macro_rules_attribute-proc_macro v0.2.0 Compiling ryu v1.0.17 Compiling bitflags v1.3.2 Compiling pyo3-ffi v0.21.2 Compiling pyo3 v0.21.2 Compiling itoa v1.0.11 Compiling base64 v0.13.1 Compiling indoc v2.0.5 Compiling unindent v0.2.3 error: failed to run custom build command for `pyo3-ffi v0.21.2` Caused by: process didn't exit successfully: `C:\Users\qh\AppData\Local\Temp\pip-install-zywhl7jb\tokenizers_44d935908006471fa654112c30249054\bindings\python\target\release\build\pyo3-ffi-c41952f64d2d7b3d\build-script-build` (exit code: 1) --- stdout cargo:rerun-if-env-changed=PYO3_CROSS cargo:rerun-if-env-changed=PYO3_CROSS_LIB_DIR cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_VERSION cargo:rerun-if-env-changed=PYO3_CROSS_PYTHON_IMPLEMENTATION cargo:rerun-if-env-changed=PYO3_PRINT_CONFIG cargo:rerun-if-env-changed=PYO3_USE_ABI3_FORWARD_COMPATIBILITY --- stderr error: the configured Python interpreter version (3.13) is newer than PyO3's maximum supported version (3.12) = help: please check if an updated version of PyO3 is available. Current version: 0.21.2 = help: set PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1 to suppress this check and build anyway using the stable ABI warning: build failed, waiting for other jobs to finish... 馃挜 maturin failed Caused by: Failed to build a native library through cargo Caused by: Cargo build finished with "exit code: 101": `"cargo" "rustc" "--features" "pyo3/extension-module" "--message-format" "json-render-diagnostics" "--manifest-path" "C:\\Users\\qh\\AppData\\Local\\Temp\\pip-install-zywhl7jb\\tokenizers_44d935908006471fa654112c30249054\\bindings\\python\\Cargo.toml" "--release" "--lib"` Error: command ['maturin', 'pep517', 'build-wheel', '-i', 'C:\\Users\\qh\\AppData\\Local\\Programs\\Python\\Python313\\python.exe', '--compatibility', 'off'] returned non-zero exit status 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for tokenizers
Author
Owner

@ErvinXie commented on GitHub (Dec 11, 2025):

This issue has been automatically closed due to inactivity for 60 days.

If you believe this issue is still relevant, please feel free to reopen it with additional information or context.

Thank you for your contribution to KTransformers!


此 issue 因超过 60 天无活动而被自动关闭。

如果您认为此问题仍然存在,请随时重新打开并提供更多信息或上下文。

感谢您对 KTransformers 的贡献!

<!-- gh-comment-id:3639888977 --> @ErvinXie commented on GitHub (Dec 11, 2025): This issue has been automatically closed due to inactivity for 60 days. If you believe this issue is still relevant, please feel free to reopen it with additional information or context. Thank you for your contribution to KTransformers! --- 此 issue 因超过 60 天无活动而被自动关闭。 如果您认为此问题仍然存在,请随时重新打开并提供更多信息或上下文。 感谢您对 KTransformers 的贡献!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/ktransformers#216
No description provided.