Ubuntu系统自带Python3,使用python3 -V 查看版本
1、下载python3.14-venv,注意Python版本号
sudo apt update
sudo apt install python3.14-venv
2、创建虚拟环境,需要在项目根目录下创建
python3 -m venv venv
3、激活虚拟环境
source venv/bin/activate
4、退出虚拟环境
deactivate
source venv/bin/activate
Ubuntu系统自带Python3,使用python3 -V 查看版本
1、下载python3.14-venv,注意Python版本号
sudo apt update
sudo apt install python3.14-venv
2、创建虚拟环境,需要在项目根目录下创建
python3 -m venv venv
3、激活虚拟环境
source venv/bin/activate
4、退出虚拟环境
deactivate
source venv/bin/activate