What does conda have to do with pluto notebooks?

I’m running Julia 1.7.3 on Windows 11.

I’m trying to use Pluto notebooks.

I try to run Pluto using

julia
using Pluto
Pluto.run()

Pluto still runs when I do this, but I get the most bizarre message as it’s firing up, basically to the effect that my system doesn’t recognize conda. I’m at my wits end as to what conda has to do with Julia, and I can use anaconda on my computer (though not from the git bash terminal that I’m using to run Julia. If any one has any insight or fixes I’d be super grateful!

Here is the lightly edited error message:

 The term 'C:\Users\user\Anaconda3\Anaconda3\Scripts\conda.exe' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At C:\Users\user\Documents\WindowsPowerShell\profile.ps1:4 char:4
+ (& "C:\Users\user\Anaconda3\Anaconda3\Scripts\conda.exe" " ...
+    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\user...ripts\conda.exe:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Here is the info about my OS:

Edition Windows 11 Home
Version 21H2
Installed on ‎11/‎24/‎2021
OS build 22000.795
Experience Windows Feature Experience Pack 1000.22000.795.0

It appears you may have installed conda into your Powershell profile at some point, so now it is trying to run whenever you start Powershell.

Here is further information about Powershell profiles:

I suggest examining “C:\Users\user\Documents\WindowsPowerShell\profile.ps1”

1 Like

Thank you, this is very helpful.

But I’m not trying to use PowerShell, but rather Git Bash is my terminal.

Furthermore, I don’t get this error when I open my terminal (Git Bash), but rather only when I type

Pluto.run()

Something is trying to run PowerShell. If conda is supposed to be in your PowerShell profile, then the issue is that conda is not on your path.

Yes, I do see what you were talking about, I uninstalled julia and then tried to reinstall, and read the help page for Windows.

They recommended using a modern terminal like the Windows terminal from the Microsoft store, and when I downloaded this terminal I immediately got the conda error message, like you said.

I still don’t really understand why Git Bash would be calling the PowerShell though…

Windows terminal has configurable options for every terminal it starts, you can check if conda didn’t insert their commands there.

I had a similar problem, where every time I tried to open any terminal (be it Powershell, Cmd, etc.), the first thing it did was to try to run conda - in my case it was Python extension for VSCode, that had the “start conda repl” option enabled.
I honestly spent whole 2 days searching for the reason. :wink:

Windows terminal is just an interface. By default it still runs powershell. It just has a slightly better UI.

This is not a Julia problem, so trying to reinstall Julia is not going to help. Pluto is trying to start an external process and needs to use a shell, in this case PowerShell, to do it. However, you seem to have a defunct conda install in your PowerShell profile.

A shell is distinct from whatever terminal you are using.

To resolve this, you either need to:

  1. Modify or rename “C:\Users\user\Documents\WindowsPowerShell\profile.ps1”
  2. Fix the path to conda.exe if you even if it installed. If it is not installed, why is it in your profile?
1 Like

What’s odd is that I just uninstalled Windows PowerShell, and then reinstalled the latest version (PowerShell 7.2.5), and now I don’t get this error message when I open PowerShell, but I do get this message when I type

Pluto.run()

Rename that backup.ps1. Do you still have an issue?

1 Like

Yes, I definitely have conda installed, but what’s interesting is that when I try to run

conda

in my Windows PowerShell 7.2.5, I get the error

conda: The term 'conda' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Either you can fix your path as in the stack overflow post, although depending on how you use conda you might not even need to use that.

Or

You can remove the profile.ps1 file by renaming it.

Per the stackoverflow post, you shouldn’t need anything in profile.ps1.

This solves it!! Thank you!