Python创建普通的虚拟化环境报错:virtualenv: error: unrecognized arguments: --no-site-packages
virtualenv --no-site-packages ${G_VENV_DIR}
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--clear-app-data] [--discovery {builtin}] [-p py] [--creator {builtin,cpython3-win,venv}] [--seeder {app-data,pip}] [--no-seed] [--activators comma_sep_list]
[--clear] [--system-site-packages] [--copies] [--download | --no-download] [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip] [--no-setuptools] [--no-wheel]
[--symlink-app-data] [--prompt prompt] [-h]
dest
virtualenv: error: unrecognized arguments: --no-site-package
版本大于20了,virtualenv版本大于20的话是默认no site packages参数
查看virtualenv版本
virtualenv --version
1. 降版本
pip install --upgrade virtualenv==16.7.9
2. 去掉–no-site-package
virtualenv ${G_VENV_DIR}