mirror of
http://junepve.top:3000/chicrobot/README.git
synced 2026-10-30 07:51:29 +08:00
31 lines
449 B
Markdown
31 lines
449 B
Markdown
# python环境配置
|
|
## 获取python
|
|
|
|
## 安装pip
|
|
```bash
|
|
dpkg -i offline/python3-pip
|
|
```
|
|
## pip换源
|
|
```bash
|
|
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
|
|
```
|
|
|
|
## venv创建虚拟环境
|
|
```bash
|
|
python3 -m venv .venv
|
|
```
|
|
|
|
## 激活虚拟环境
|
|
```bash
|
|
source .venv/bin/activate
|
|
```
|
|
|
|
## 启动项目
|
|
# 将当前目录为项目
|
|
```bash
|
|
export PYTHONPATH=/PathToDir:$PYTHONPATH
|
|
```
|
|
# 启动main.py
|
|
```bash
|
|
python main.py
|
|
``` |