mirror of
http://junepve.top:3000/chicrobot/README.git
synced 2026-10-30 05:41:29 +08:00
更新 d1_python环境配置.md
This commit is contained in:
1 parent
2cfc0d196f
commit
7845e8c5ec
1 file changed
+15
-1
+15
-1
@@ -11,20 +11,34 @@ pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/
|
|||||||
```
|
```
|
||||||
|
|
||||||
## venv创建虚拟环境
|
## venv创建虚拟环境
|
||||||
|
linux
|
||||||
```bash
|
```bash
|
||||||
python3 -m venv .venv
|
python3 -m venv .venv
|
||||||
```
|
```
|
||||||
|
windows
|
||||||
|
```bash
|
||||||
|
python -m venv .venv
|
||||||
|
```
|
||||||
## 激活虚拟环境
|
## 激活虚拟环境
|
||||||
|
linux
|
||||||
```bash
|
```bash
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
```
|
```
|
||||||
|
windows
|
||||||
|
```bash
|
||||||
|
& .venv/Scripts/Activate.ps1
|
||||||
|
```
|
||||||
|
|
||||||
## 启动项目
|
## 启动项目
|
||||||
### 将当前目录为项目
|
### 将当前目录为项目
|
||||||
|
linux
|
||||||
```bash
|
```bash
|
||||||
export PYTHONPATH=$(pwd):$PYTHONPATH
|
export PYTHONPATH=$(pwd):$PYTHONPATH
|
||||||
```
|
```
|
||||||
|
windows
|
||||||
|
```bash
|
||||||
|
$env:PYTHONPATH = "$PWD.Path;$env:PYTHONPATH"
|
||||||
|
```
|
||||||
### 启动main.py
|
### 启动main.py
|
||||||
```bash
|
```bash
|
||||||
python main.py
|
python main.py
|
||||||
|
|||||||
Reference in new issue
Block a user