mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2026-11-05 01:07:28 +00:00
[GH-ISSUE #340] Installing ktransformers failed #219
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
kvcache-ai/ktransformers#219
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @sky-3311 on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/kvcache-ai/ktransformers/issues/340
(base) PS C:\Users\81103> conda create --name ktransformers python=3.11
Channels:
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done
environment location: C:\Users\81103\Miniconda3\envs\ktransformers
added / updated specs:
- python=3.11
The following NEW packages will be INSTALLED:
bzip2 pkgs/main/win-64::bzip2-1.0.8-h2bbff1b_6
ca-certificates pkgs/main/win-64::ca-certificates-2024.12.31-haa95532_0
libffi pkgs/main/win-64::libffi-3.4.4-hd77b12b_1
openssl pkgs/main/win-64::openssl-3.0.15-h827c3e9_0
pip pkgs/main/win-64::pip-25.0-py311haa95532_0
python pkgs/main/win-64::python-3.11.11-h4607a30_0
setuptools pkgs/main/win-64::setuptools-75.8.0-py311haa95532_0
sqlite pkgs/main/win-64::sqlite-3.45.3-h2bbff1b_0
tk pkgs/main/win-64::tk-8.6.14-h0416ee5_0
tzdata pkgs/main/noarch::tzdata-2025a-h04d1e81_0
vc pkgs/main/win-64::vc-14.42-haa95532_4
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.42.34433-he0abc0d_4
wheel pkgs/main/win-64::wheel-0.45.1-py311haa95532_0
xz pkgs/main/win-64::xz-5.6.4-h4754444_1
zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_1
Proceed ([y]/n)? y
Downloading and Extracting Packages:
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(base) PS C:\Users\81103> conda activate ktransformers # you may need to run conda init and reopen shell first
(ktransformers) PS C:\Users\81103> pip install torch packaging ninja cpufeature numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting torch
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/11/c5/2370d96b31eb1841c3a0883a492c15278a6718ccad61bb6a649c80d1d9eb/torch-2.6.0-cp311-cp311-win_amd64.whl (204.2 MB)
Collecting packaging
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl (65 kB)
Collecting ninja
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/03/93/09a9f7672b4f97438aca6217ac54212a63273f1cd3b46b731d0bb22c53e7/ninja-1.11.1.3-py3-none-win_amd64.whl (296 kB)
Collecting cpufeature
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e0/3e/7c0cfe499eb6579c4499fa925713c4d5c2042b9ab83006aa033df83240f4/cpufeature-0.2.1-cp311-cp311-win_amd64.whl (15 kB)
Collecting numpy
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b9/c6/cd4298729826af9979c5f9ab02fcaa344b82621e7c49322cd2d210483d3f/numpy-2.2.3-cp311-cp311-win_amd64.whl (12.9 MB)
Collecting filelock (from torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/89/ec/00d68c4ddfedfe64159999e5f8a98fb8442729a63e2077eb9dcd89623d27/filelock-3.17.0-py3-none-any.whl (16 kB)
Collecting typing-extensions>=4.10.0 (from torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl (37 kB)
Collecting networkx (from torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b9/54/dd730b32ea14ea797530a4479b2ed46a6fb250f682a9cfb997e968bf0261/networkx-3.4.2-py3-none-any.whl (1.7 MB)
Collecting jinja2 (from torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/bd/0f/2ba5fbcd631e3e88689309dbe978c5769e883e4b84ebfe7da30b43275c5a/jinja2-3.1.5-py3-none-any.whl (134 kB)
Collecting fsspec (from torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/e2/94/758680531a00d06e471ef649e4ec2ed6bf185356a7f9fbfbb7368a40bd49/fsspec-2025.2.0-py3-none-any.whl (184 kB)
Collecting sympy==1.13.1 (from torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b2/fe/81695a1aa331a842b582453b605175f419fe8540355886031328089d840a/sympy-1.13.1-py3-none-any.whl (6.2 MB)
Collecting mpmath<1.4,>=1.1.0 (from sympy==1.13.1->torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/43/e3/7d92a15f894aa0c9c4b49b8ee9ac9850d6e63b03c9c32c0367a13ae62209/mpmath-1.3.0-py3-none-any.whl (536 kB)
Collecting MarkupSafe>=2.0 (from jinja2->torch)
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/da/b8/3a3bd761922d416f3dc5d00bfbed11f66b1ab89a0c2b6e887240a30b0f6b/MarkupSafe-3.0.2-cp311-cp311-win_amd64.whl (15 kB)
Installing collected packages: mpmath, cpufeature, typing-extensions, sympy, packaging, numpy, ninja, networkx, MarkupSafe, fsspec, filelock, jinja2, torch
Successfully installed MarkupSafe-3.0.2 cpufeature-0.2.1 filelock-3.17.0 fsspec-2025.2.0 jinja2-3.1.5 mpmath-1.3.0 networkx-3.4.2 ninja-1.11.1.3 numpy-2.2.3 packaging-24.2 sympy-1.13.1 torch-2.6.0 typing-extensions-4.12.2
(ktransformers) PS C:\Users\81103> cd e:/
(ktransformers) PS E:> git clone https://github.com/kvcache-ai/ktransformers.git
fatal: destination path 'ktransformers' already exists and is not an empty directory.
(ktransformers) PS E:> cd ktransformers
(ktransformers) PS E:\ktransformers> git submodule init
Submodule 'third_party/llama.cpp' (https://github.com/ggerganov/llama.cpp.git) registered for path 'third_party/llama.cpp'
Submodule 'third_party/pybind11' (https://github.com/pybind/pybind11.git) registered for path 'third_party/pybind11'
(ktransformers) PS E:\ktransformers> git submodule update
Cloning into 'E:/ktransformers/third_party/llama.cpp'...
Cloning into 'E:/ktransformers/third_party/pybind11'...
Submodule path 'third_party/llama.cpp': checked out 'a94e6ff8774b7c9f950d9545baf0ce35e8d1ed2f'
Submodule path 'third_party/pybind11': checked out 'bb05e0810b87e74709d9f4c4545f1f57a1b386f5'
(ktransformers) PS E:\ktransformers> install.bat
系统找不到指定的文件。
系统找不到指定的文件。
系统找不到指定的文件。
系统找不到指定的文件。
找不到 E:\ktransformers\ktransformers\ktransformers_ext\cuda*.egg-info
Installing python dependencies from requirements.txt
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting fire (from -r requirements-local_chat.txt (line 1))
Using cached fire-0.7.0-py3-none-any.whl
Collecting transformers==4.43.2 (from -r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/13/63/cccd0297770d7096c19c99d4c542f3068a30e73cdfd971a920bfa686cb3a/transformers-4.43.2-py3-none-any.whl (9.4 MB)
Requirement already satisfied: numpy in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from -r requirements-local_chat.txt (line 3)) (2.2.3)
Requirement already satisfied: torch>=2.3.0 in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from -r requirements-local_chat.txt (line 4)) (2.6.0)
Requirement already satisfied: packaging in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from -r requirements-local_chat.txt (line 5)) (24.2)
Requirement already satisfied: cpufeature in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from -r requirements-local_chat.txt (line 6)) (0.2.1)
Collecting protobuf (from -r requirements-local_chat.txt (line 7))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/61/fa/aae8e10512b83de633f2646506a6d835b151edf4b30d18d73afd01447253/protobuf-5.29.3-cp310-abi3-win_amd64.whl (434 kB)
Requirement already satisfied: filelock in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from transformers==4.43.2->-r requirements-local_chat.txt (line 2)) (3.17.0)
Collecting huggingface-hub<1.0,>=0.23.2 (from transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ea/da/6c2bea5327b640920267d3bf2c9fc114cfbd0a5de234d81cda80cc9e33c8/huggingface_hub-0.28.1-py3-none-any.whl (464 kB)
Collecting pyyaml>=5.1 (from transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/ed/23/8da0bbe2ab9dcdd11f4f4557ccaf95c10b9811b13ecced089d43ce59c3c8/PyYAML-6.0.2-cp311-cp311-win_amd64.whl (161 kB)
Collecting regex!=2019.12.17 (from transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/80/32/763a6cc01d21fb3819227a1cc3f60fd251c13c37c27a73b8ff4315433a8e/regex-2024.11.6-cp311-cp311-win_amd64.whl (274 kB)
Collecting requests (from transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f9/9b/335f9764261e915ed497fcdeb11df5dfd6f7bf257d4a6a2a686d80da4d54/requests-2.32.3-py3-none-any.whl (64 kB)
Collecting tokenizers<0.20,>=0.19 (from transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/65/8e/6d7d72b28f22c422cff8beae10ac3c2e4376b9be721ef8167b7eecd1da62/tokenizers-0.19.1-cp311-none-win_amd64.whl (2.2 MB)
Collecting safetensors>=0.4.1 (from transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/86/ca/aa489392ec6fb59223ffce825461e1f811a3affd417121a2088be7a5758b/safetensors-0.5.2-cp38-abi3-win_amd64.whl (303 kB)
Collecting tqdm>=4.27 (from transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d0/30/dc54f88dd4a2b5dc8a0279bdd7270e735851848b762aeb1c1184ed1f6b14/tqdm-4.67.1-py3-none-any.whl (78 kB)
Collecting termcolor (from fire->-r requirements-local_chat.txt (line 1))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/7f/be/df630c387a0a054815d60be6a97eb4e8f17385d5d6fe660e1c02750062b4/termcolor-2.5.0-py3-none-any.whl (7.8 kB)
Requirement already satisfied: typing-extensions>=4.10.0 in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from torch>=2.3.0->-r requirements-local_chat.txt (line 4)) (4.12.2)
Requirement already satisfied: networkx in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from torch>=2.3.0->-r requirements-local_chat.txt (line 4)) (3.4.2)
Requirement already satisfied: jinja2 in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from torch>=2.3.0->-r requirements-local_chat.txt (line 4)) (3.1.5)
Requirement already satisfied: fsspec in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from torch>=2.3.0->-r requirements-local_chat.txt (line 4)) (2025.2.0)
Requirement already satisfied: sympy==1.13.1 in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from torch>=2.3.0->-r requirements-local_chat.txt (line 4)) (1.13.1)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from sympy==1.13.1->torch>=2.3.0->-r requirements-local_chat.txt (line 4)) (1.3.0)
Collecting colorama (from tqdm>=4.27->transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\81103\miniconda3\envs\ktransformers\lib\site-packages (from jinja2->torch>=2.3.0->-r requirements-local_chat.txt (line 4)) (3.0.2)
Collecting charset-normalizer<4,>=2 (from requests->transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/1e/ab/45b180e175de4402dcf7547e4fb617283bae54ce35c27930a6f35b6bef15/charset_normalizer-3.4.1-cp311-cp311-win_amd64.whl (102 kB)
Collecting idna<4,>=2.5 (from requests->transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/76/c6/c88e154df9c4e1a2a66ccf0005a88dfb2650c1dffb6f5ce603dfbd452ce3/idna-3.10-py3-none-any.whl (70 kB)
Collecting urllib3<3,>=1.21.1 (from requests->transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/c8/19/4ec628951a74043532ca2cf5d97b7b14863931476d117c471e8e2b1eb39f/urllib3-2.3.0-py3-none-any.whl (128 kB)
Collecting certifi>=2017.4.17 (from requests->transformers==4.43.2->-r requirements-local_chat.txt (line 2))
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/38/fc/bce832fd4fd99766c04d1ee0eead6b0ec6486fb100ae5e74c1d91292b982/certifi-2025.1.31-py3-none-any.whl (166 kB)
Installing collected packages: urllib3, termcolor, safetensors, regex, pyyaml, protobuf, idna, colorama, charset-normalizer, certifi, tqdm, requests, fire, huggingface-hub, tokenizers, transformers
Successfully installed certifi-2025.1.31 charset-normalizer-3.4.1 colorama-0.4.6 fire-0.7.0 huggingface-hub-0.28.1 idna-3.10 protobuf-5.29.3 pyyaml-6.0.2 regex-2024.11.6 requests-2.32.3 safetensors-0.5.2 termcolor-2.5.0 tokenizers-0.19.1 tqdm-4.67.1 transformers-4.43.2 urllib3-2.3.0
Installing ktransformers
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing e:\ktransformers
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
Traceback (most recent call last):
File "C:\Users\81103\Miniconda3\envs\ktransformers\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 389, in
main()
File "C:\Users\81103\Miniconda3\envs\ktransformers\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 373, in main
json_out["return_val"] = hook(**hook_input["kwargs"])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\81103\Miniconda3\envs\ktransformers\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 175, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\81103\Miniconda3\envs\ktransformers\Lib\site-packages\setuptools\build_meta.py", line 377, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\81103\Miniconda3\envs\ktransformers\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
File "", line 296, in
File "", line 132, in get_package_version
File "", line 54, in get_cuda_bare_metal_version
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Installation completed successfully
(ktransformers) PS E:\ktransformers>
@KMSorSMS commented on GitHub (Feb 16, 2025):
你有clone完submodule吗?应该是没有clone submodule的,你
git submodule init再git submodule update@hahassss commented on GitHub (Feb 16, 2025):
有成功clone
(ktransformers) PS D:\python_project\git\ktransformers> git submodule init
(ktransformers) PS D:\python_project\git\ktransformers> git submodule update
(ktransformers) PS D:\python_project\git\ktransformers> ./install.bat
#352