Addressed an issue where PowerShell could not activate the conda virtual environment Attempts to activate but not actually done, as shown below
$ conda info -e
# conda environments:
#
py2 C:\Users\USERNAME\AppData\Local\Continuum\Anaconda3\envs\py2
root * C:\Users\USERNAME\AppData\Local\Continuum\Anaconda3
#Currently root
$ activate py2 #I want to change to py2
$ conda info -e
# conda environments:
#
py2 C:\Users\USERNAME\AppData\Local\Continuum\Anaconda3\envs\py2
root * C:\Users\USERNAME\AppData\Local\Continuum\Anaconda3
#Stay root!
We received a comment from @lambdalisue. You can activate it with the following command.
$ conda install -n root -c pscondaenvs pscondaenvs
It was in Powershell activate and deactivate # 626
Download the activate / deactivate command for PowerShell from Liquidmantis / PSCondaEnvs Copy the file to the folder where activate.bat/deactivate.bat is located
$ git clone https://github.com/Liquidmantis/PSCondaEnvs
$ cd PSCondaEnvs
$ cp activate.ps1 ~\Appdata\Local\Continuum\Anaconda3\Scripts\.
$ cp deactivate.ps1 ~\Appdata\Local\Continuum\Anaconda3\Scripts\.
$ activate py2
Activating environment "py2..."
$ conda info -e
# conda environments:
#
py2 * C:\Users\USERNAME\AppData\Local\Continuum\Anaconda3\envs\py2
root C:\Users\USERNAME\AppData\Local\Continuum\Anaconda3
#I was able to activate!
Recommended Posts