Files
notes/resource/python/python 环境.md
T
Docker7530 6b50219f55 1776654103
2026-04-20 11:01:47 +08:00

29 lines
461 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
传统:
```
python -m venv .venv
.venv\Scripts\Activate.ps1 # 激活
pip install requests
python main.py
deactivate # 退出
```
用 uv 完全不需要 activate/deactivate
```
uv init
uv add requests # 自动管理 .venv
uv run main.py # 自动用 .venv 里的环境运行
```