在 Windows 11 64位 + CPU(无GPU) 环境下,安装 numpy、torch(PyTorch)、transformers 和 bge-m3 需要特别注意以下几点:
1. 环境准备
- Python 版本:建议使用 Python 3.8-3.10(PyTorch CPU 版本在 Windows 对 Python 3.11 的支持有限)。
- 安装方式:推荐使用
conda管理环境,避免依赖冲突。 - ** CPU 兼容性**:确保 Python 和库均为 64位,且 CPU 的 AVX 指令集支持(大多数现代 CPU 都支持)。
2. 推荐版本组合
(1) numpy
- 版本:
numpy==1.24.4(兼容性广泛,支持 CPU)。 - 安装命令:
pip install numpy==1.24.4
(2) PyTorch(CPU 版)
- 版本:
torch==2.0.1+torchvision==0.15.2(CPU 版本,无需 CUDA)。 - 安装命令:
pip install torch==2.0.1+cpu torchvision==0.15.2+cpu --extra-index-url https://download.pytorch.org/whl/cpu- 注意:确保使用
--extra-index-url指定 PyTorch 官方 CPU 源,否则可能找不到包。
- 注意:确保使用

最低0.47元/天 解锁文章
936

被折叠的 条评论
为什么被折叠?



