怎么使用 python 虚拟环境 venv: Revision history

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

29 September 2025

  • curprev 10:4310:43, 29 September 2025Mwroot talk contribs 1,032 bytes +1,032 Created page with "== pip 不要 sudo == 不要用 sudo pip install xxx 安装系统级别的包。不要用 sudo pip,它会改写系统层面的配置。 用 apt 或 pacman 等系统层面的包管理工具,安装系统层面的应用,如 sudo pacman -S python-requests == 用好 venv == <syntaxhighlight lang="bash"> sudo apt install python3-venv python3 -m venv venvsth source venv/bin/activate pip install -r requirements.txt </syntaxhighlight> * 只要你已经执行了 source ve..."