Sometimes, in order to use a cleaner development environment, or to test some versions of an extension library, we may need to create a virtual development environment that installs only the required extension libraries in different virtual development environments, which minimizes the conflicts or other issues that can result from compatibility between different extension libraries.
Anaconda3 has become a favorite software for Python community, providing Jupyter notebook and Spyder is an unacceptable python development environment, especially for researchers and engineers in data analytics and scientific computing and visualization is one of the necessary Ides.
In order to use Anaconda3 to create a virtual development environment, it is best to ensure that the "Add environment variable" is checked when installing ANACONDA3, and if not, you can manually add and configure environment variables after the installation is completed Anaconda3. This article takes Win10 64-bit as an example, first open the Explorer, right-click "This Computer", click "Properties" in the pop-up menu, click "Advanced System Settings" in the pop-up window, such as
Click "Environment Variables" in the pop-up window to pop up the following window
In the upper window, double-click "Path", pop the following window, if there is no red rectangle within a few paths, click on the right side of "new" to add a new path, let the path variable contains a few paths within the red box.
Next, go to the command prompt cmd environment, execute the command Conda create-n pythontensorflow python=3.5 Create a python 3.5-based virtual development environment, such as
Then execute the command Conda create-n pythonpil python=3.6 Create a python-based 3.6 version of the virtual development environment, such as
Next, use the command Conda install-n Pythonpil Pillow to install the extension library Pythonpil for the virtual development environment named Pillow, as
Use the command Conda install-n pythontensorflow tensorflow to install the extension library Pythontensorflow for a virtual development environment named TensorFlow, as
Here, the expansion libraries required for each virtual development environment are installed.
Use the command activate Pythonpil to activate the virtual development environment Pythonpil, do your own development, for the complete Python program, you can use the Spyder to write, use the command after the end of the deactivate to close the virtual development environment, such as
Demonstrates the activation and shutdown of another virtual development environment Pythontensorflow
Configuring a multi-version Python virtual development environment using ANACONDA3