Files
notes/resource/python/python 环境.md
T
Docker7530 7f14056210 1778682052
2026-05-13 22:20:54 +08:00

35 lines
431 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# scoop 安装
全局包:
```
E:\MyScoop\Scoop\apps\python\current\Lib\site-packages
```
# 虚拟环境(venv
## 传统
```bash
# 创建一个虚拟环境
python -m venv .venv
# 激活
.venv\Scripts\Activate.ps1
pip install requests
python main.py
# 退出
deactivate
```
## uv
```
uv init
uv add numpy # 自动管理 .venv
uv run main.py # 自动用 .venv 里的环境运行
```