Python使用虚拟环境
本文来源:Python使用虚拟环境-钻芒博客 (zuanmang.net)
安装虚拟环境
sudo apt-get update
sudo apt-get install python3-venv
回到用户目录:
cd ~
创建虚拟环境:
python3 -m venv venv
激活虚拟环境:
source venv/bin/activate
在激活的虚拟环境中安装所需库:
pip install openpyxl pandas sklearn nltk
现在你应该可以在虚拟环境中运行你的脚本:
python 去除同义词.py
Python使用虚拟环境-钻芒博客 (zuanmang.net)