python 虚拟环境-windows

1. 环境管理

  1. 创建虚拟环境

    python -m venv myenv

  2. 激活虚拟环境(这里用的git shell在windows上操作,所以有点不一样)

    source myenv/Scripts/activate

  3. 取消虚拟环境

    deactivate

2. 简单介绍

创建完虚拟环境在,在虚拟环境的文件下会有对应里面的依赖信息,在脚本里面也有他启动和关闭的文件信息

复制代码
-myenv:
		-Include/  Lib/  Scripts/  pyvenv.cfg
-Scripts:
-rw-r--r-- 1 01452547 1049089   9031 Oct 14 15:43 Activate.ps1
drwxr-xr-x 1 01452547 1049089      0 Dec  4 22:19 __pycache__/
-rw-r--r-- 1 01452547 1049089   2228 Dec  4 20:23 activate
-rw-r--r-- 1 01452547 1049089   1032 Dec  4 20:23 activate.bat
-rw-r--r-- 1 01452547 1049089   2291 Dec  4 20:23 activate.fish
-rw-r--r-- 1 01452547 1049089    393 Oct 14 15:40 deactivate.bat
-rwxr-xr-x 1 01452547 1049089   1753 Dec  4 22:19 jp.py*
-rwxr-xr-x 1 01452547 1049089 108415 Dec  4 20:30 normalizer.exe*
-rwxr-xr-x 1 01452547 1049089 108403 Dec  4 20:23 pip.exe*
-rwxr-xr-x 1 01452547 1049089 108403 Dec  4 20:23 pip3.13.exe*
-rwxr-xr-x 1 01452547 1049089 108403 Dec  4 20:23 pip3.exe*
-rwxr-xr-x 1 01452547 1049089 255320 Oct 14 15:41 python.exe*
-rwxr-xr-x 1 01452547 1049089 251736 Oct 14 15:41 pythonw.exe*
相关推荐
花酒锄作田15 小时前
Pydantic校验配置文件
python
hboot15 小时前
AI工程师第四课 - 深度学习入门
pytorch·python·神经网络
ZhengEnCi1 天前
P2M-Matplotlib折线图完全指南-从数据可视化到趋势分析的Python绘图利器
python·matlab·数据可视化
ZhengEnCi1 天前
P2L-Matplotlib饼图完全指南-从数据可视化到图表定制的Python绘图利器
python·matlab
曲幽1 天前
你的REST接口还在“过度投喂”数据吗?——FastAPI + GraphQL实战避坑指南
python·fastapi·web·graphql·route·cors·rest·strawberry
用户8358086187911 天前
基于 Self-RAG 与列表级重排序的进阶 RAG 系统设计与实现
python
Warson_L2 天前
Python `Annotated` 与 LangGraph Reducer 学习笔记
python
韩师傅2 天前
海天线算法的前世今生
python·计算机视觉
韩师傅2 天前
当你的甲方设备过烂,要如何快速出效果?
python·计算机视觉
Warson_L2 天前
LangGraph的MessageState and HumanMessage
python