for the python that comes with the system, vanilla python. We tend to select virtualenv for installation, but if the system’s default python environment is shipped with anaconda, the following error
pops out when executing the command
setuptools pip wheel failed with error code 1
for python on Anaconda, how do we set up a virtual environment?There are two ways.
1. Using conda to install virtualenv, execute the following command
PIP uninstall virtualenv
conda install virtualenv
virtualenv YourVirtualEnvName
this method is available for pro test.
bis. Conda comes with the function of creating virtual environment
-
check whether conda has
installed
conda -V
-
check if conda has been updated to the latest version
conda update conda
Blockquote>
-
create virtual environment
conda cret-n YourVirtualEnvName python= X.X.X anaconda
this X.X.X is a version of python that can be used by using the commandconda search "^python$"
. -
activate virtual environment
source activate YourVirtualEnvName
-
install third-party package
conda install -n YourVirtualEnvName [Package]
if-n YourVirtualEnvName
is not added, the installation will executeunder system python
Blockquote> -
inactivated virtual environment
source deactivate
Blockquote>
-
delete virtual environment
conda remove -n YourVirtualEnvName -all