操作系统 是 win10 ,
Python 版本是 Python 3.6.5 (64位)
执行 virtualenv --no-site-packages py_flash2
时,报错了 ,
C:\Users\Admin>virtualenv --no-site-packages py_flash2
usage: virtualenv [--version] [--with-traceback] [-v | -q] [--app-data APP_DATA] [--reset-app-data] [--upgrade-embed-wheels] [--discovery {builtin}] [-p py] [--creator {builtin,cpython3-win,venv}] [--seeder {app-data,pip}] [--no-seed]
[--activators comma_sep_list] [--clear] [--system-site-packages] [--copies] [--no-download | --download] [--extra-search-dir d [d ...]] [--pip version] [--setuptools version] [--wheel version] [--no-pip] [--no-setuptools]
[--no-wheel] [--no-periodic-update] [--symlink-app-data] [--prompt prompt] [-h]
dest
virtualenv: error: unrecognized arguments: --no-site-packages
SystemExit: 2
经查询,发现参数 --no-site-packages
已经过时,现在改成了 --system-site-packages
。
最终,创建虚拟化环境的命令:virtualenv --system-site-packages py_flask2
,
C:\Users\Admin>virtualenv --system-site-packages py_flask2
created virtual environment CPython3.6.5.final.0-64 in 1037ms
creator CPython3Windows(dest=C:\Users\Admin\py_flask2, clear=False, global=True)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=C:\Users\Admin\AppData\Local\pypa\virtualenv)
added seed packages: pip==20.2.2, setuptools==49.6.0, wheel==0.35.1
activators BashActivator,BatchActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator