- sudo apt install python3-tk python3-pip python3-venv
-sudo dnf install python3-tkinter python3-pip`
cd location_for_thonny_venv(存放虚拟环境的目录)
python3 -m venv thonny_venv_name(待创建的虚拟环境名)
. thonny_venv_name/activate (激活虚拟环境)
Linux 系统中,激活脚本路径是 thonny_venv_name/bin/activate,默认脚本没有执行权限,要么设置脚本为可执行,要么用 source 命令执行,例如
source thonny_venv_name/bin/activate
pip3 install thonny
thonny
deactivate