Python 学习整理2

各种python 相关命令

PHPer 2025-08-26 37 0 0

torch.cuda.is_available()命令行查看cuda的命令

命令行(CMD / Anaconda Prompt)里直接敲:

python -c "import torch; print(torch.cuda.is_available())"

返回 True 表示 CUDA 可用,False 表示不可用。


conda create -n my -c https://conda.anaconda.org/conda-forge --override-channels mamba

用conda-forge的官方源安装 环境变量名是my的mamba环境 20250826 0712


激活环境后,没装python装python,装了python的话直接执行

pip3 install torch torchaudio torchvision --index-url https://download.pytorch.org/whl/cu129

具体根据你显卡驱动的cuda版本 cu129就是cuda12.9

如果是做音频处理,建议按下面这些扩展

pip3 install fastapi uvicorn pydantic python-multipart  librosa  soundfile pydub scipy pillow  python-dotenv pytest httpx

20250828 0720

报错


Collecting anyio<5,>=3.6.2 (from starlette<0.48.0,>=0.40.0->fastapi)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a1/ee/48ca1a7c89ffec8b6a0c5d02b89c305671d5ffd8d3c94acf8b8c408575bb/anyio-4.9.0-py3-none-any.whl (100 kB)
Collecting starlette<0.48.0,>=0.40.0 (from fastapi)
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/f7/1f/b876b1f83aef204198a42dc101613fefccb32258e5428b5f9259677864b4/starlette-0.47.2-py3-none-any.whl (72 kB)
Collecting pydantic-core==2.33.2 (from pydantic)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a0/75/4a0a9bac998d78d889def5e4ef2b065acba8cae8c93696906c3a91f310ca/pydantic_core-2.33.2-cp313-cp313-win_amd64.whl (2.0 MB)
     ---------------------------------------- 2.0/2.0 MB 2.3 MB/s  0:00:00
Collecting pydantic
  Using cached https://pypi.tuna.tsinghua.edu.cn/packages/6a/c0/ec2b1c8712ca690e5d61979dee872603e92b8a32f94cc1b72d53beab008a/pydantic-2.11.7-py3-none-any.whl (444 kB)
ERROR: Ignored the following versions that require a different python version: 0.52.0 Requires-Python >=3.6,<3.9; 0.52.0rc3 Requires-Python >=3.6,<3.9; 0.53.0 Requires-Python >=3.6,<3.10; 0.53.0rc1.post1 Requires-Python >=3.6,<3.10; 0.53.0rc2 Requires-Python >=3.6,<3.10; 0.53.0rc3 Requires-Python >=3.6,<3.10; 0.53.1 Requires-Python >=3.6,<3.10; 0.54.0 Requires-Python >=3.7,<3.10; 0.54.0rc2 Requires-Python >=3.7,<3.10; 0.54.0rc3 Requires-Python >=3.7,<3.10; 0.54.1 Requires-Python >=3.7,<3.10; 0.55.0 Requires-Python >=3.7,<3.11; 0.55.0rc1 Requires-Python >=3.7,<3.11; 0.55.1 Requires-Python >=3.7,<3.11; 0.55.2 Requires-Python >=3.7,<3.11; 1.10.0 Requires-Python >=3.8,<3.12; 1.10.0rc1 Requires-Python >=3.8,<3.12; 1.10.0rc2 Requires-Python >=3.8,<3.12; 1.10.1 Requires-Python >=3.8,<3.12; 1.11.0 Requires-Python >=3.9,<3.13; 1.11.0rc1 Requires-Python >=3.9,<3.13; 1.11.0rc2 Requires-Python >=3.9,<3.13; 1.11.1 Requires-Python >=3.9,<3.13; 1.11.2 Requires-Python >=3.9,<3.13; 1.11.3 Requires-Python >=3.9,<3.13; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 1.26.0 Requires-Python >=3.9,<3.13; 1.26.1 Requires-Python >=3.9,<3.13; 1.6.2 Requires-Python >=3.7,<3.10; 1.6.3 Requires-Python >=3.7,<3.10; 1.7.0 Requires-Python >=3.7,<3.10; 1.7.1 Requires-Python >=3.7,<3.10; 1.7.2 Requires-Python >=3.7,<3.11; 1.7.3 Requires-Python >=3.7,<3.11; 1.8.0 Requires-Python >=3.8,<3.11; 1.8.0rc1 Requires-Python >=3.8,<3.11; 1.8.0rc2 Requires-Python >=3.8,<3.11; 1.8.0rc3 Requires-Python >=3.8,<3.11; 1.8.0rc4 Requires-Python >=3.8,<3.11; 1.8.1 Requires-Python >=3.8,<3.11; 1.9.0 Requires-Python >=3.8,<3.12; 1.9.0rc1 Requires-Python >=3.8,<3.12; 1.9.0rc2 Requires-Python >=3.8,<3.12; 1.9.0rc3 Requires-Python >=3.8,<3.12; 1.9.1 Requires-Python >=3.8,<3.12; 3.3.0 Requires-Python >=3.9,<3.13; 3.3.1 Requires-Python >=3.9,<3.13; 3.3.2 Requires-Python >=3.9,<3.13; 3.3.3 Requires-Python >=3.9,<3.13; 3.3.4 Requires-Python >=3.9,<3.13; 3.4.0 Requires-Python >=3.9,<3.13; 3.4.1 Requires-Python >=3.9,<3.13; 3.4.2 Requires-Python >=3.9,<3.13
ERROR: Could not find a version that satisfies the requirement ctranslate2==4.4.0 (from whisperx) (from versions: 4.6.0)
ERROR: No matching distribution found for ctranslate2==4.4.0
(fse) D:\python\fastapi-speaker-extractor>
(fse) D:\python\fastapi-speaker-extractor>python --version
Python 3.13.5
(fse) D:\python\fastapi-speaker-extractor>

20250826 0747...

立即注册
更新于:2025-08-26 07:48:02
    您需要登录后才可以评论。 立即注册
    相关内容

    互联网相关

    2008年通过互联网领袖扑克牌看中国互联网形势

    我用搜索引擎中遇到的问题和心得

    受芯片供应不足影响,传闻南北大众汽车近期陷入停产。

    泄密者斯诺登:美国的“叛徒”,曾被人视为英雄,如今却无人问津

    独家专访|奥利弗·斯通:这部肯尼迪纪录片揭露惊人真相,在美国却卖不出去

    奥利弗·斯通谈《斯诺登》:这年头每个人都受到监听

    用四小时的纪录片,奥利弗·斯通要让西方认识不一样的普京

    库布里克一生,有两个最大的遗憾

    奥利弗·斯通回顾越战50周年:我们不善于总结历史教训

    演奥利弗-斯通:我很喜欢周星驰

    Cult片经典《天生杀人狂》究竟讲了一个怎样疯狂的故事?

    导演斯通抨击中国电影题材禁区

    《亚历山大》遭滑铁卢 史诗巨片不再是票房保证

    奥利佛·斯通批评媒体对其《芭比》言论断章取义

    奧利弗·斯通北京電影節上呼籲中國正視歷史

    奥利弗·斯通怒批《拯救大兵瑞恩》非常恶心

    保险相关

    保险法律法规相关

    保险知识

    保险观察

    哪些人容易得肺癌?这5个真相,你一定要知道!

    哪些女性会比较容易患乳腺癌?

    哪些人容易得乳腺癌?更年期女性真的要当心!

    保险公司介绍

    销售保险产品的网站

    教育相关

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

    学习模型蒸馏之蒸馏SoloSpeech 2025年8月

    Google colab 测试运行SoloSpeech蒸馏项目中教师模型的训练

    学习模型蒸馏之蒸馏SoloSpeech 2025年8月 与通义对话

    腾讯云代码助手(Tencent Cloud CodeBuddy)插件在VS Code上

    线上训练数据的一些技巧

    云主机选择 试试 DigitalOcean 毕竟有新加坡服务器。

    云盘选择

    Linux/Ubuntu服务器命令行使用百度网盘

    SoloSpeech 模型训练终于有了眉目 20250829 2325

    各种和模型训练相关的工具

    相关问题报错

    python 调式代码的几种方法

    python报错 ModuleNotFoundError: No module named 'solospeech'​

    如何用有效的用conda安装python扩展

    SoloSpeech 训练的扩展安装

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

    模型训练过程中的报错 unexpected pos 88457920 vs 88457808

    模型训练平台汇总

    Copilot的能力不低,不可小觑 20250902

    关于魔塔的静默提示,解决静默提醒提示。

    python -m py_compile "d:\python\SoloSpeech\solospeech\stable_audio_v...

    线上平台和CPU服务器压力测试

    Python 常用命令整理

    魔塔社区 modelscope 常用命令

    推荐内容

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

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

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

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

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

    使用V2Ray的mKCP协议加速游戏

    v2rayN已停止工作

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