PyCharm创建virtualenv方法

打开Project Interpreters页面:文件(file)——>设置(setting)——>项目(Project)——>Project Interpreters;
点击右边的配置按钮配置,选择Create VirtualEnv。这时会弹出Create Virtual Environment的对话框;

配置新环境:

Name中填写新虚拟环境的名字,或者使用默认名字,方便以后安装第三方包和其他项目使用;

在Location中填写新环境的文件目录;

在Base interpreter下拉框中选择Python解释器;

勾选Inherit global site-packages可以使用base interpreter中的第三方库,不选将和外界完全隔离;

勾选Make available to all projects可将此虚拟环境提供给其他项目使用。

原文地址:https://www.cnblogs.com/luowenConnor/p/11802047.html