python 虚拟环境 自带python管理虚拟环境 # 查看已安装版本 py -0 # 调用Python 3.6 py -3.6 --version # 用Python 3.6创建虚拟环境 py -3.6 -m venv myenv36 # 激活虚拟环境 myenv36\Scripts\activate # 验证版本 python --version # 输出Python 3.6.x #退出-关闭窗口即是退出 deactivate #导出安装的模块 pip freeze requirements.txt#安装uv pip install uv #或者用但是这个应该需要翻墙 powershell -c irm https://astral.sh/uv/install.ps1 | iex #安装python312虚拟环境 uv venv py312 --python 3.12 #terminal 需要设置不然报错 Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force ####给虚拟环境安装pip uv pip install pip uv pip install pip --python .\py312 ###升级pip python -m pip install --upgrade pip#导出安装的模块 pip freeze requirements.tx ------------- 1增加配置 env/pip/pip.ini 2文件内容为 [global] index-url https://mirrors.aliyun.com/pypi/simple/ timeout 120 [install] trusted-host mirrors.aliyun.com 2强制让 pip 优先读取虚拟环境配置 # 临时指定虚拟环境内的pip.ini路径 pip config --site set global.index-url https://mirrors.aliyun.com/pypi/simple/用bat 启动temial echo off cd /d D:\phpstudy_pro\WWW\shopyo2 start wt -d %CD% powershell -NoExit -Command .\a312\Scripts\Activate.ps1

相关新闻

最新新闻

SerenityOS 命令行选项解析指南:getopt 与 getopt_long 用法、返回值与底层实现

SerenityOS 命令行选项解析指南:getopt 与 getopt_long 用法、返回值与底层实现

SerenityOS 命令行选项解析指南:getopt 与 getopt_long 用法、返回值与底层实现 【免费下载链接】serenity The Serenity Operating System 🐞 项目地址: https://gitcode.com/GitHub_Trending/se/serenity 导读 本文以 getopt(3) 手册 为核心&a…

2026/9/30 14:41:37
轻量服务器还是ECS?大促云服务器选购与避坑实战指南

轻量服务器还是ECS?大促云服务器选购与避坑实战指南

每年大促节点,群里永远有人在问同一个问题:“38元的轻量服务器到底怎么抢?为什么我每次点进去都是已售罄?68元直购和99元的ECS我到底选哪个?”作为一个常年帮团队和自己采购云服务器的老用户,我太清楚这种纠…

2026/9/29 2:52:51
为 AI 代理的 Review 动作编写 Cedar 审批门控策略:review-agent-governance 策略编写实战指南

为 AI 代理的 Review 动作编写 Cedar 审批门控策略:review-agent-governance 策略编写实战指南

为 AI 代理的 Review 动作编写 Cedar 审批门控策略:review-agent-governance 策略编写实战指南 【免费下载链接】agents Multi-harness agentic plugin marketplace for Claude Code, Codex, Cursor, OpenCode, GitHub Copilot, and Google Antigravity 项目地址:…

2026/9/30 19:41:56
PaddleOCR 手写数学公式识别算法 CAN 实战指南:Counting-Aware Network 训练、评估与推理部署

PaddleOCR 手写数学公式识别算法 CAN 实战指南:Counting-Aware Network 训练、评估与推理部署

PaddleOCR 手写数学公式识别算法 CAN 实战指南:Counting-Aware Network 训练、评估与推理部署 【免费下载链接】PaddleOCR Turn any PDF or image document into structured data for your AI. A powerful, lightweight OCR toolkit that bridges the gap between i…

2026/9/30 18:23:43
Spring源码解析:构造器注入的类型转换与候选匹配机制

Spring源码解析:构造器注入的类型转换与候选匹配机制

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/9/29 22:57:57
openai-agents-python 多模型接入指南:深入解析 AnyLLMModel 适配层与 any-llm 路由

openai-agents-python 多模型接入指南:深入解析 AnyLLMModel 适配层与 any-llm 路由

openai-agents-python 多模型接入指南:深入解析 AnyLLMModel 适配层与 any-llm 路由 【免费下载链接】openai-agents-python A lightweight, powerful framework for multi-agent workflows 项目地址: https://gitcode.com/GitHub_Trending/op/openai-agents-pyth…

2026/9/29 2:52:53

日新闻

周新闻