Trouble Running Julia REPL in Git Bash on Windows

Hello Julia Community,

I’ve encountered an issue when trying to run the Julia REPL in Git Bash on my Windows machine and I’m hoping for some assistance in troubleshooting the problem.

Issue Description: When I attempt to start a Julia session by typing julia in Git Bash, the REPL starts but immediately freezes, and I am unable to type any commands. Interestingly, when I run Git Bash within Visual Studio Code or use Git CMD, the Julia REPL works as expected. This issue seems to be isolated to running Julia in an independent Git Bash window.

Steps Taken So Far:

  1. Confirmed that Julia works fine in VSCode’s integrated terminal when Git Bash is selected from the dropdown menu.
  2. Uninstalled and reinstalled Git Bash
  3. Attempted to run Julia with winpty julia, but received an “Access is denied” error, likely due to the Julia installation being from the Windows Store (WindowsApps folder).
  4. Uninstalled and reinstalled the Windows Store version of Julia.
  5. Added the Julia bin directory to the PATH variable in Git Bash via the .bashrc file, with the correct path:
  6. Verified that the PATH is correctly set in Git Bash, i.e. julia --version returns “julia version 1.9.4”

System Information:

  • Windows Version: Microsoft Windows 10 Enterprise 10.0.19044 N/A Build 19044
  • Git Bash Version: Git-2.43.0-64-bit
  • Julia Version: 1.9.4

Additional Context: When closing Git Bash after I call julia and it hangs, I get a the following message.
image

What’s really strange is that I can get this to work on my laptop, but not on a new desktop that I am trying to setup. I can’t seem to figure out what’s significantly different between my laptop and this desktop setup that is preventing this from working. I would greatly appreciate any insights or suggestions on how I could troubleshoot this further.

Thank you in advance for your help!

It will not work. Use Windows Terminal instead, you can configure it such that it uses bash by default. The pure git bash does not work when you have juliaup installed, but with windows terminal it works.

1 Like

Thanks for the heads up!

That is strange. Julia in the Git bash works fine for me.


Perhaps something wrong with your mingw install?
Try GitHub - PetrKryslUCSD/VSCode_Julia_portable: Portable Julia running in VSCode. Let me know
how things go please. :slight_smile:

Did you install it using juliaup? Only that causes the problem.

have you considered using WSL2 instead of git-bash? julia works fine for me there.

Also have a look at Mobaxterm. I really rate this

MobaXterm free Xserver and tabbed SSH client for Windows (mobatek.net)

Was able to find a workable solution based on your post/suggestion. Thanks again!