Python与模型相关知识以及问题的整理

python的一些包或扩展依赖于torch,会在安装的时候安装上torch的CPU版

PHPer 2025-08-31 12 0 0

比如prefigure会连带安装torch的版本2.8.0+cpu​。 20250831

python 的一些包或扩展依赖于torch,会在安装的时候安装上torch的CPU版,比如pip installprefigure,安装的时候会按照对应版本的torch的CPU版本,如果你已经安装了Torch不是他依赖的版本,他会先卸载你已安装的Torch然后再按照CPU他依赖版本的Torch。

pip install prefigure  

om requests->huggingface-hub<1.0,>=0.33.5->gradio->prefigure) (3.4.3)
Requirement already satisfied: urllib3<3,>=1.21.1 in g:\programdata\miniconda3\envs\train_ss\lib\site-packages (from requests->huggingface-hub<1.0,>=0.33.5->gradio->prefigure) (2.5.0)
Collecting gitpython!=3.1.29,>=1.0.0 (from wandb->prefigure)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/01/61/d4b89fec821f72385526e1b9d9a3a0385dda4a72b206d28049e2c7cd39b8/gitpython-3.1.45-py3-none-any.whl (208 kB)
Requirement already satisfied: platformdirs in g:\programdata\miniconda3\envs\train_ss\lib\site-packages (from wandb->prefigure) (4.4.0)
Collecting protobuf!=4.21.0,!=5.28.0,<7,>=3.19.0 (from wandb->prefigure)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e1/59/0a820b7310f8139bd8d5a9388e6a38e1786d179d6f33998448609296c229/protobuf-6.32.0-cp310-abi3-win_amd64.whl (435 kB)
Collecting sentry-sdk>=2.0.0 (from wandb->prefigure)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/62/1f/5feb6c42cc30126e9574eabc28139f8c626b483a47c537f648d133628df0/sentry_sdk-2.35.1-py2.py3-none-any.whl (363 kB)
Collecting gitdb<5,>=4.0.1 (from gitpython!=3.1.29,>=1.0.0->wandb->prefigure)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/a0/61/5c78b91c3143ed5c14207f463aecfc8f9dbb5092fb2869baf37c273b2705/gitdb-4.0.12-py3-none-any.whl (62 kB)
Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython!=3.1.29,>=1.0.0->wandb->prefigure)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/04/be/d09147ad1ec7934636ad912901c5fd7667e1c858e19d355237db0d0cd5e4/smmap-5.0.2-py3-none-any.whl (24 kB)
Installing collected packages: mpmath, gin-config, argparse, sympy, smmap, sentry-sdk, protobuf, propcache, networkx, multidict, lightning-utilities, frozenlist, configparser, attrs, async-timeout, aiohappyeyeballs, yarl, torch, gitdb, aiosignal, torchmetrics, gitpython, aiohttp, wandb, pytorch-lightning, prefigure
Successfully installed aiohappyeyeballs-2.6.1 aiohttp-3.12.15 aiosignal-1.4.0 argparse-1.4.0 async-timeout-5.0.1 attrs-25.3.0 configparser-7.2.0 frozenlist-1.7.0 gin-config-0.5.0 gitdb-4.0.12 gitpython-3.1.45 lightning-utilities-0.15.2 mpmath-1.3.0 multidict-6.6.4 networkx-3.4.2 prefigure-0.0.10 propcache-0.3.2 protobuf-6.32.0 pytorch-lightning-2.5.4 sentry-sdk-2.35.1 smmap-5.0.2 sympy-1.14.0 torch-2.8.0 torchmetrics-1.8.1 wandb-0.21.2 yarl-1.20.1

(train_ss) C:\Users\Administrator>python -c "import torch; print(torch.__version__)"
2.8.0+cpu

这里能看到,prefigure安装了torch的版本是2.8.0+cpu,就是Torch版本号是2.8.0的CUP版。...

立即注册
更新于:2025-08-31 10:51:42
    您需要登录后才可以评论。 立即注册
    相关内容

    Python的扩展和模块安装时遇到的问题整理

    windows环境下python3安装Crypto扩展

    pip install​ 报错 ERROR: Can not execute setup.py since setuptools i...

    运行python -V 报错 -bash: python: command not found

    protobuf requires Python ‘>=3.7‘ but the running Python is 3.6.5的解...

    AI和Python 学习整理

    AudioSeparationGUI 对输入的音频,自动根据说话人进行分类 20250817

    SoloSpeech 项目安装和运行测试 20250817

    python 多项目部署 优先考虑用Anaconda

    espnet 声音分离

    ClearerVoice-Studio 安装测试遇到的问题,安装pysptk一直失败

    uvr5 bs roformer 爆显存以及关于huggingface的国内镜像hf-mirror.com

    用Kimi编程

    Studio One 调试插件Techivation AI-Rack 一键智能混音

    在hf-mirror.com模型镜像站用代码下载模型遇到报错 speaker-diarization模型不...

    用腾讯元宝编程

    Conda国内镜像源

    数字对象标识符 (DOI)

    在创建conda环境时,如果不指定Python版本,conda将不会默认安装Python。

    whisperx 的使用 音频处理

    Win10系统 Trae的使用 关于powershell报错: 因为在此系统上禁止运行脚本

    warp的使用

    AI编程工具比较

    FastApi

    python 报错整理2

    给出一份「Python 中常见 import 名称 与 pip install 名称不一致」的速查表

    Windows用Conda创建环境报错 CondaToSNonInteractiveError: Terms of Se...

    快速验证顺序是否被改

    Python 学习整理2

    fastapi-speaker-extractor whisperx 项目报错 ValueError: The chosen ...

    python报错 UnicodeEncodeError: 'gbk' codec can't encode character '\u...

    python whisperx 报错 in load_align_model raise ValueError(f'The ch...

    pyannote/embedding 模型是真难引入模型

    Trae 或者是我自己 莫名奇妙创建了个文件,影响了项目代码的运行。

    WhisperX 无法加载模型

    HUGGINGFACE_HUB_CACHE 设置错误导致的问题

    Trae的bug太多了,怪不得免费

    通义之旅

    通义之旅2

    目标说话人声音提取模型训练的思路

    python报错 can't convert cuda:0 device type tensor to numpy. Use Tenso...

    Expected all tensors to be on the same device, but found at least two ...

    腾讯元宝推荐的项目结构(音频处理项目)

    音频处理项目fse

    各种python 相关命令

    python 报错 SyntaxError: 'return' outside function

    python常用命令

    腾讯编程助手

    python一些扩展兼容安装的处理方案

    python 和 conda

    启动powershell,conda 自动激活base

    推荐内容

    怎样使用V2Ray代理和SSTap玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩...

    sstap游戏代理教程 从此玩如魔兽世界/绝地求生/LOL台服/战地3/黑色沙漠/彩虹六...

    BT磁力搜索网站汇总和找不到的资源

    什么是磁力链接,您如何使用?

    Z-Library:全球最大的数字图书馆/含打不开的解决方案/镜像

    使用V2Ray的mKCP协议加速游戏

    v2rayN已停止工作

    【车险课堂】什么是无赔款优待系数ncd,你“造”吗?