-
Notifications
You must be signed in to change notification settings - Fork 426
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
Windows error: "conda activate" fails because shell is not initialized #3371
Comments
@nicoddemus please update conda-build. 3.17.7+ should be good here. |
Hi @msarahan, Thanks for the lightning fast response. I should have mentioned this, but I have tried to update the
Which is strange because I'm using
|
bizarre. That's a new one to me. It looks like you have your own mirrors rather than using our servers. Are those mirrors up-to-date? |
Hmm they should be, they update every 2 hours:
Strangely enough, using the default channels to update
Even more strange, if I use
So the "update issue" is somehow related to our mirrors. Further investigation suggests that it is because of the order of our mirrors: the first channel is an internal channel with a custom python build (with MSVC2010), which is taking precedence and generating the conflicts:
Strangely I would expect the above command to work, because I believe conda should be honoring the After managing to update to the latest conda build, indeed this solved my problem. 😅 Thanks @msarahan for nudging me into the right direction! 👍 |
Writing my findings here in case it helps someone in the future. We have two mirrors, one mirroring So our channel list is:
When trying to install the latest conda-build, I was getting this error:
It isn't clear which package is actually missing that would solve the requirements, so I tried a lot of things ( In the end the method which clearly stated which packages were missing was to add the In my case, it was |
Linux error: "conda activate" fails because shell is not initialized Hi,
Currently supported shells are:
See 'conda init --help' for more information and options. IMPORTANT: You may need to close and restart your shell after running 'conda init'. |
Here is my Relevant conda info:
populated config files : /home/jocelina/.condarc |
hi @nicoddemus, I am currently getting the exact same error message when using the command $ conda info
populated config files : Here are my environments: $ conda env list conda environments:base * C:\Users\kdw9736\AppData\Local\Continuum\anaconda3 I tried updating conda-forge and it didn't throw an error: $ conda install conda-build=3.17.8 -c conda-forge Package Planenvironment location: C:\Users\kdw9736\AppData\Local\Continuum\anaconda3 added / updated specs: The following packages will be downloaded:
The following packages will be UPDATED: conda-build pkgs/main::conda-build-3.17.8-py37_0 --> conda-forge::conda-build-3.17.8-py37_1 The following packages will be SUPERSEDED by a higher-priority channel: certifi pkgs/main --> conda-forge Proceed ([y]/n)? y Downloading and Extracting Packages I figure this is a stab in the dark given my minimal experience, but appreciate any advice! |
On the windows environment use "anaconda prompt" instead of "command prompt". Go to search. |
most cleaner option will be eval "$(conda shell.bash hook)" |
To retain a familiar bash terminal feel. I downloaded Git bash, and created a .bashrc file in /c/Users//.
|
It happened to me too, but in my case I solved the problem in this way: I moved to the Anaconda directory with the cd command and wrote the comand conda activate nameoftheenviroment. |
I've been attempting to deal with this issue all evening. I'm attempting to run code in the VSCode terminal and get the "Your shell has not been properly configured..." I'd like to try some of these solutions but I have no idea what "nameoftheenvironment", "my_env", "<your_environment>" mean. I'm assuming that these are placeholders but I don't know what to replace them with. Help please. |
"nameoftheenvironment" is the name that you have asgin to your the environment. |
Yeah, ummm...that didn't help. |
Thanks! |
yichangyu: Thank you. Very easy to follow advice. I appreciate it. |
Hi, I´ve your same problem : I don´t have idea which is my enviroment name ? C:\Users\pc>conda --version C:\Users\pc>conda info
populated config files : C:\Users\pc.condarc C:\Users\pc>conda activate base C:\Users\pc>eval "$(conda shell.bash hook)" C:\Users\pc>conda activate my_env C:\Users\pc>conda activate <env_name> C:\Users\pc>conda activate <env_name> |
|
For conda versions older than 4.4 the command is as follows for different types of operating systems:: source activate For Linux and macOS OR activate For Windows. You will have to remove the conda keyword from the command. (The above text was extracted from https://kodlogs.com/34141/command-not-found-error-your-shell-has-not-been-properly-configured-to-use-conda-activate) |
I got the "conda activate" fails because shell is not initialized. I'm using Git Bash with conda version 4.9.2.
|
If you are using Git Bash on Windows and if it is giving 'You shell has not been configured properly' message, just run:
It worked for me. I did not want to try out anything harsh using the above suggestions because I did not want to mess up my environments. |
Run |
This works for me when trying to fix the same error in Emacs shell. I am wondering if there is a way to make this stick and be applied when the new shell is loaded? |
I was having the same problem and this worked for me too. I added |
Found an easy solution to get Conda to work inside VSCode on Windows. Change this setting: This will change the default terminal launched when clicking play button from powershell to cmd. Anaconda seems to not set itself up correctly in powershell, but runs fine in cmd prompt. |
hi @iggirex can you please explain how to get this done |
So I've had this issue with powershell and cmder for over a year now, it frustrated me a year ago and decided to never use cmder again ... until a couple days ago when I decided to try it again and I cannot for the life of me figure out what is wrong. Most likely from my lack of understanding of the entire environment. Anyway what I did notice is that if I copy the line You can achieve the same effect by going to Not sure what that means but I figured I'd give this information out to anyone searching and maybe they can come up with a solution based off of this. |
Hi,
After updating to conda
4.6.1
, I'm getting this error when I try to build a recipe:I still get this error even after executing
conda init cmd.exe
and restarting the shell. I've also executedconda init cmd.exe
withbase
environment active, but obtain the same results.Using the same
conda
andconda-build
combinations work on Linux.Relevant
conda info
:Any advice appreciated. 👍
cc @prusse-martin
The text was updated successfully, but these errors were encountered: