Pycharm can use the features in virtualenv to create a virtual environment. Pycharm tightly integrates the virtualenv, so you only need to configure it in setting to create a virtual environment. and Pycharm Bundle The virtualenv, we don't need to install it separately. The general creation process is as follows:
1. Open Project Interpreters page: File---setting---project-->project interpreters;
2, select the project, click on the Right Configuration button, select Create Virtualenv. This will pop up the Create Virtual Environment dialog box;
3. Configure the new environment:
Name in the new virtual environment, or use the default name, to facilitate the installation of third-party packages and other projects to use;
Fill in the file directory of the new environment in the location;
Select the Python interpreter in the Base interpreter drop-down box;
Tick inherit global site-packages to use a third-party library in base interpreter, which is completely isolated from the outside world;
Tick make available to all projects this virtual environment is available for use by other projects.
4, click OK, all configuration is complete. This is not much simpler than configuring virtualenv alone.