Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deactivate an environment using Windows? #344

Closed
raderaj opened this issue Nov 9, 2013 · 10 comments
Closed

How to deactivate an environment using Windows? #344

raderaj opened this issue Nov 9, 2013 · 10 comments
Labels
locked [bot] locked due to inactivity

Comments

@raderaj
Copy link

raderaj commented Nov 9, 2013

I'm working on a windows PC machine. It is easy to create a new environment using a command such as:
conda create -n test python pip

Then the prompt accurately indicates one should activate this environment using
activate test
(note this is not source activate test).

However I can't seem to deactivate or change to other environments without closing out the command console/powershell.
Typing
deactivate test
produces this error:
'deactiveate' is not recognized as an internal or external command, opererable program or batch file.

Any suggestions on how to deactivate this environment or change to another one?

@ilanschnell
Copy link
Contributor

On Windows, due to the lack of the deactivate command, you type:

> activate root

Note that root is a special reserved name for the root environment.

@opadron
Copy link

opadron commented Nov 23, 2013

Hi! New, experimenting user, here.
After following the advice given above, I see

No environment named "root" exists in C:\[[PATH_TO_MY_HOME]]\Anaconda\envs

and I remain stuck in the Anaconda-created environment.
I am on windows 7, using the 64-bit windows download from http://continuum.io/downloads.

@JCBrown
Copy link

JCBrown commented Nov 27, 2013

Another new user with the same issue. Once I've activated an environment I'm un-able to deactivate or activate root.

Current conda install:

platform : win-32
conda version : 2.2.2
root environment : C:\Anaconda  (writable)
default environment : C:\Anaconda
envs directories : C:\Anaconda\envs
package cache : C:\Anaconda\pkgs
channel URLs : http://repo.continuum.io/pkgs/free/win-32/
                    http://repo.continuum.io/pkgs/pro/win-32/
config file : None

I'm on Win7 x64 with a 32-bit installation of Anaconda 1.7 updated to 1.8 via conda.

@iesmatauw
Copy link

Just installed anaconda in win7, to deactivate i use
activate ..

@Prooffreader
Copy link

According to the Anaconda documentation, you should just type:

deactivate

I just tried it, works fine.

@jrwrigh
Copy link

jrwrigh commented Jun 22, 2018

I'm running into these issues right now as well. No idea what on earth is going on. See my StackExchange question for more details.

Bottom line, I my computer "find" activate, deactivate, or conda despite fully knowing where they are via a where function. Even if I cd to the location of the files, it still claims that it can't find them.

@johanesmikhael
Copy link

johanesmikhael commented Nov 3, 2018

Hello, @u2berggeist. I'm running the exact same issue now. It is solved when I update my Conda. However, it is happened again in one of my env after updating some Conda package in that environment.

I found the culprit was in the path that contained in activate, activate.bat, deactivate, deactivate.bat'script and other scripts as well within Script folder in your environment folder.

Here is the examples path from conda and conda.bat in 'python2env' environment in which conda command is working from my C:\Users\myusername\Miniconda3\envs\python2env\Scripts folder
conda
'#!/usr/bin/env bash C:\Users\myusername\Miniconda3\Scripts\conda.exe "$@"

conda.bat
@echo off call "C:\Users\myusername\Miniconda3\Scripts\conda" %*

And this one from 'python35' env ins which conda command is not working anymore from my C:\Users\myusername\Miniconda3\envs\python35\Scripts
conda
#!/usr/bin/env bash C:\Miniconda35-x64\Scripts\conda.exe "$@"
conda.bat
@echo off call "C:\Miniconda35-x64\Scripts\conda" %*

The scripts contained a path which does not exist in my computer which leads to "The system cannot find the path specified." error. I change the path of each script and it is working again like charm.

However, I failed to figure out how the path changed during my conda package installation.

@gitDawn
Copy link

gitDawn commented Jan 29, 2019

On Windows, due to the lack of the deactivate command, you type:

> activate root

Note that root is a special reserved name for the root environment.

That doesn't work.
'activate' is not recognized as an internal or external command,
operable program or batch file.

@ecardenas1123
Copy link

Hi everyone, I'm a beginner with programming languages and I'm running into this issue right now, could someone solve it?
thanks a lot.

(env) λ deactivate
'deactivate' is not recognized as an internal or external command,
operable program or batch file.

@github-actions
Copy link

github-actions bot commented Mar 3, 2022

Hi there, thank you for your contribution to Conda!

This issue has been automatically locked since it has not had recent activity after it was closed.

Please open a new issue if needed.

@github-actions github-actions bot added the locked [bot] locked due to inactivity label Mar 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity
Projects
None yet
Development

No branches or pull requests

10 participants