You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
620 B
620 B
一、项目相关
- 创建或初始化项目
mkdir projectName
cd projectName && uv init --python 指定版本
目录结构如下
.
├── .venv
│ ├── bin
│ ├── lib
│ └── pyvenv.cfg
├── .python-version
├── README.md
├── hello.py
├── pyproject.toml
└── uv.lock
- 初始化虚拟环境,自动创建.venv文件夹
uv run main.py
- 修改python包源,编辑
pyproject.toml
文件,增加如下内容
[[tool.uv.index]]
name = "private-pypi"
url = "https://mirrors.aliyun.com/pypi/simple/"
default = true