Welcome! Please see the About page for a little more info on how this works.

0 votes
in Clojure by

I need help on how to install and use my Clojure on my Windows Operating system.

4 Answers

+1 vote
by

On Windows, it is very easy to manage Clojure CLI install with scoop.

https://github.com/littleli/scoop-clojure

0 votes
by

See https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows

Although my personal recommendation is to install WSL2 (Windows Subsystem for Linux) and Ubuntu -- both from the Microsoft Store, assuming you're on Windows 11 or a recent Windows 10 -- and then you can just follow all the books/tutorials out there that assume macOS/Linux and you won't have to worry about weird quoting rules in Powershell or cmd.exe

VS Code has an official extension for working with WSL2 that lets you run VS Code on Windows with all your development setup on Ubuntu as if it were local. That's an easy way to work with Clojure on Windows (using Calva for Clojure integration).

0 votes
by

How I do it for Leiningen projects (works on Windows 7-11):

https://gist.github.com/nikolavojicic/6081284d4fb5f969a7fabe1f150db73e

0 votes
by

Using WSL2 and installing Clojure inside Linux under WSL2 is probably ideal. If you learn to do it that way, it also means indirectly you're learning how to develop on Mac, Linux and Windows all at the same time, since the workflows will be the same between all three.

Alternatively, if you really don't want to go the WSL2 route, I recommend using https://github.com/borkdude/deps.clj

You can install it by running:

> PowerShell -Command "iwr -useb https://raw.githubusercontent.com/borkdude/deps.clj/master/install.ps1 | iex"

Then to use Clojure just type:

> deps.exe
Clojure 1.10.1
user=>

Just keep in mind every time you'll see in a guide or tutorial to use at the command line either clj or clojure in this case you have to substitute it for deps.exe.

...