jshprentz

jshprentz

I tried the Launch Week Day 2 example on a newly installed Livebook v0.9.1 running on Windows 11. As in the Day 2 video, I created a new notebook and added a neural network smart cell. I confirmed the popup to add the kino_bumblebee and torchx dependencies and restart. After some time and much output, it fails.

The notebook setup created automatically is:

Mix.install(
  [
    {:kino_bumblebee, "~> 0.2.1"},
    {:torchx, "~> 0.5.1"}
  ],
  config: [nx: [default_backend: Torchx.Backend]]
)

The error message is:

==> torchx
could not compile dependency :torchx, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile torchx", update it with "mix deps.update torchx" or clean it with "mix deps.clean torchx"
** (Mix.Error) "nmake" not found in the path. If you have set the MAKE environment variable,
please make sure it is correct.

    (mix 1.14.2) lib/mix.ex:513: Mix.raise/2
    (elixir_make 0.7.6) lib/elixir_make/compiler.ex:120: ElixirMake.Compiler.cmd/5
    (elixir_make 0.7.6) lib/elixir_make/compiler.ex:97: ElixirMake.Compiler.make/2
    (elixir_make 0.7.6) lib/elixir_make/compiler.ex:53: ElixirMake.Compiler.compile/1
    (mix 1.14.2) lib/mix/task.ex:421: anonymous fn/3 in Mix.Task.run_task/4
    (mix 1.14.2) lib/mix/tasks/compile.all.ex:92: Mix.Tasks.Compile.All.run_compiler/2
    (mix 1.14.2) lib/mix/tasks/compile.all.ex:72: Mix.Tasks.Compile.All.compile/4
    #cell:setup:1: (file)

I notice that the video shows different dependencies: kino_bumblebee and exla.

What other dependencies and setup steps do I need to run the neural network examples in Livebook on Windows?

Showing Posts 1 to 3

josevalim

josevalim

Creator of Elixir

You need to install Visual c++ Express on Windows: Visual Studio: IDE and Code Editor for Software Development

The error message should have said this. I investigate why it didn’t.

But generally speaking the error message, the ML tooling in general, even Python, focused on Linux, so consider using the Docker image too.

jshprentz

jshprentz OP

Thanks. I will try the Docker image.

I was able to get many of the neural network features working after some trial and error. These steps led to success:

  1. Install Microsoft C++ development tools.
  2. Install CUDA 11.6
  3. Install cuDNN 8.9.0
  4. Disable Python aliases in Windows Settings/Manage App Execution Aliases
  5. Apply Microsoft development environment variables to the Livebook notebook setup cell.
  6. Add additional environment variables reported in error messages.
  7. Click “Reconnect and setup” above the setup cell.

To capture the Microsoft development environment variables, run

cmd /K "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64

and type set to show all environment variables. Edit them into an Elixir map passed to Mix.install as system_env.

In response to error messages, I added CUDNN_ROOT, LIBTORCH_TARGET, and PYTHON.

With those changes, the setup cell begins with the following contents. Paths, versions, and unrelated environment variables may vary on other computers.

Mix.install(
  [
    {:kino_bumblebee, "~> 0.2.1"},
    {:torchx, "~> 0.5.1"}
  ],
  config: [nx: [default_backend: Torchx.Backend]],
  system_env: %{
    "LIBTORCH_TARGET" => "cu116",
    "CUDNN_ROOT" => "C:\\Program Files\\NVIDIA\\CUDNN\\v8.9",
    "PYTHON" => "C:\\Users\\Joel\\AppData\\Local\\Programs\\Python\\Python39\\python.exe",
    
    "ALLUSERSPROFILE" => "C:\\ProgramData",
    "APPDATA" => "C:\\Users\\Joel\\AppData\\Roaming",
    "CARBON_MEM_DISABLE" => "1",
    "ChocolateyInstall" => "C:\\ProgramData\\chocolatey",
    "ChocolateyLastPathUpdate" => "133196555883524332",
    "CommandPromptType" => "Native",
    "CommonProgramFiles" => "C:\\Program Files\\Common Files",
    "CommonProgramFiles(x86)" => "C:\\Program Files (x86)\\Common Files",
    "CommonProgramW6432" => "C:\\Program Files\\Common Files",
    "COMPUTERNAME" => "JOELS-DELL-XPS-",
    "ComSpec" => "C:\\Windows\\system32\\cmd.exe",
    "CUDA_PATH" => "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6",
    "CUDA_PATH_V11_6" => "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.6",

I have not attempted to repeat this setup from scratch on a clean machine.

josevalim

josevalim

Creator of Elixir

Nice! If you are using the desktop app, there is a file that is executed once it boots to set env vars. You can find it here: GitHub - livebook-dev/livebook: Automate code & data workflows with interactive Elixir notebooks · GitHub - maybe you can set it once and then use notebooks as usual?

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
kpanic
Hi everyone, I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding. I sta...
New
brecabral
Documentation While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
asweet-confluent
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
apz
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New

Other Trending Topics Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews