在Ubuntu 16.04上使用virtualenv 15.0.1和Python 3.5.2(都安装了apt),当我创建和激活新的Python虚拟环境时
virtualenv .virtualenvs/wtf -p $(which python3) --no-site-packages
source .virtualenvs/wtf/bin/activate
Run Code Online (Sandbox Code Playgroud)
我得到以下输出:
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/das-g/.virtualenvs/wtf/bin/python3
Also creating executable in /home/das-g/.virtualenvs/wtf/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
Run Code Online (Sandbox Code Playgroud)
确实pip freeze --all列出了这4个包:
pip==8.1.2
pkg-resources==0.0.0
setuptools==25.2.0
wheel==0.29.0
Run Code Online (Sandbox Code Playgroud)
虽然,我希望pip freeze(没有--all)省略这些隐式安装的软件包.它确实省略了其中一些,但没有pkg-resources:
pkg-resources==0.0.0
Run Code Online (Sandbox Code Playgroud)
(同btw.pip freeze --local)
虽然这与帮助文本一致
$> pip freeze --help | grep '\--all'
--all Do not skip these packages in the output: pip, setuptools, …Run Code Online (Sandbox Code Playgroud)