leetcode怎么配置环境变量。Leetcode评分监控项目建立步骤:
步骤0 - 项目环境设置
-
设置Python环境并获取它:
```
mkdir ~/python-virtual-environments
cd ~/python-virtual-environments
python3 -m venv
source ~/python-virtual-environments/env/bin/activate
```
-
将项目环境变量永久添加到.profile:
```
# For Leetcode project
export LEETCODE_PROJECT_ENV=~/python-virtual-environments/env/bin/activate
export LEETCODE_PROJECT_SCRAPER_PATH=~/leetcode_score_monitoring/src/Scraper/leetCode_spider
```
-
将上述行添加到
~/.profile
后,然后通过以下方式获取配置文件:```
source ~/.profile
```
-
获取
LEETCODE_PROJECT_ENV
。
暂无评论