Documentation Index
Fetch the complete documentation index at: https://base.bangwu.me/llms.txt
Use this file to discover all available pages before exploring further.
Python 上的包管理器和虚拟环境——V2EX
Python的环境管理工具可谓是多之又多
图片来源https://alpopkes.com/posts/python/packaging_tools/
Python 版本管理
pyenv pipenv
Python包管理
pip uv pdm
Rye配置
vscode 识别不到解释器路径问题
{
"python.defaultInterpreterPath": ".\\.venv\\Scripts\\python.exe"
}
rye config --set proxy.http=http://127.0.0.1:7890
rye config --set proxy.https=http://127.0.0.1:7890
设置shims全局
rye config --set-bool behavior.global-python=true
设置pypi镜像 config.toml
# Rye config.toml
[[sources]]
name = "default"
url = "https://pypi.org/simple/"
设置jupyter
我的配置
[default]
toolchain = "cpython@3.13.2"
license = "MIT"
author = "bangwu <i@bangwu.top>"
[proxy]
https = "http://127.0.0.1:10808"
http = "http://127.0.0.1:10808"
[behavior]
global-python = true
autosync = true
use-uv = true
[[sources]]
name = "default"
url = "https://pypi.tuna.tsinghua.edu.cn/simple/"
开一个项目
rye pin 3.x
rye init // 或者 rye init -p cpython@3.x [project name]
rye sync
rye add [package]