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.

32 lines
620 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

## 一、项目相关
+ 创建或初始化项目
```shell
mkdir projectName
cd projectName && uv init --python 指定版本
```
目录结构如下
```text
.
├── .venv
│ ├── bin
│ ├── lib
│ └── pyvenv.cfg
├── .python-version
├── README.md
├── hello.py
├── pyproject.toml
└── uv.lock
```
+ 初始化虚拟环境,自动创建.venv文件夹
```shell
uv run main.py
```
+ 修改python包源编辑`pyproject.toml`文件,增加如下内容
```text
[[tool.uv.index]]
name = "private-pypi"
url = "https://mirrors.aliyun.com/pypi/simple/"
default = true
```