使用virtualenv构建python虚拟环境
hb@hb-pc ~ $ virtualenv --python=python3 --no-site-packages test Running virtualenv with interpreter /usr/bin/python3 Using base prefix '/usr' New python executable in test/bin/python3 Also creating executable in test/bin/python Installing setuptools, pip, wheel...done. hb@hb-pc ~ $ source test/bin/activate (test)hb@hb-pc ~ $ pip list pip (7.1.2) setuptools (18.2) wheel (0.24.0) You are using pip version 7.1.2, however version 8.1.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command. (test)hb@hb-pc ~ $ deactive deactive:未找到命令 (test)hb@hb-pc ~ $ deactivate