Machine Learning in Elixir:Error installing EXLA dependency - Page 25

Getting an error when installing the dependencies at the start of this chapter:

could not compile dependency :exla, "mix compile" failed. Errors may have been logged above. You can recompile this dependency with "mix deps.compile exla", update it with "mix deps.update exla" or clean it with "mix deps.clean exla"
** (RuntimeError) could not find v0.4.4 release under https://github.com/elixir-nx/xla/releases
    (xla 0.4.4) lib/xla.ex:180: XLA.download_matching!/1
    (xla 0.4.4) lib/xla.ex:33: XLA.archive_path!/0
...

Is there a good solution for this?

This happens sporadically with GitHub outages. If you retry it should go through, but let me know if you have any additional problems

I’ve tried again a few times since then… same error.

Also, is it odd that it seems to be looking for 0.4.4 when the Mix.install() command is specifying “:exla ~> 0.5”?

As shown above… still getting this error.

Does this possibly have to do with running Livebook on a Windows machine?

@seanmor5
Update: I also have an old Mac Mini laying around, so I tried on that machine. Exla installed just fine… so it appears that maybe the exercises in this book aren’t compatible with Windows, at least as written…?

Hey there, yeah so Windows at the moment will not work :frowning:

You’ll need to use Linux or Mac. WSL2 should work as well!

@seanmor5

Also had the problem on a mac (Ventura 13.5.2) several tries during the day. Using version 0.5.3 instead however seems to download and compile fine in LiveBook.

@seanmor5

I’m still having the same problem running it on a Docker Machine with Alpine 3.20

Mix.install([
{:nx, “~> 0.7”},
{:exla, “~> 0.7”, env: :prod},
{:benchee, “~> 1.0”}
])

Resolving Hex dependencies…
Resolution completed in 0.204s
New:
benchee 1.3.1
complex 0.5.0
deep_merge 1.0.0
elixir_make 0.8.4
exla 0.7.3
nimble_pool 1.1.0
nx 0.7.3
statistex 1.0.0
telemetry 1.2.1
xla 0.6.0

  • Getting nx (Hex package)
  • Getting exla (Hex package)
  • Getting benchee (Hex package)
  • Getting deep_merge (Hex package)
  • Getting statistex (Hex package)
  • Getting elixir_make (Hex package)
  • Getting nimble_pool (Hex package)
  • Getting telemetry (Hex package)
  • Getting xla (Hex package)
  • Getting complex (Hex package)
    ==> deep_merge
    Compiling 2 files (.ex)
    Generated deep_merge app
    ===> Analyzing applications…
    ===> Compiling telemetry
    ==> statistex
    Compiling 3 files (.ex)
    Generated statistex app
    ==> complex
    Compiling 2 files (.ex)
    Generated complex app
    ==> nx
    Compiling 35 files (.ex)
    Generated nx app
    ==> nimble_pool
    Compiling 2 files (.ex)
    Generated nimble_pool app
    ==> benchee
    Compiling 46 files (.ex)
    Generated benchee app
    ==> elixir_make
    Compiling 8 files (.ex)
    Generated elixir_make app
    ==> xla
    Compiling 2 files (.ex)
    Generated xla app
    ==> exla
    could not compile dependency :exla, “mix compile” failed. Errors may have been logged above. You can recompile this dependency with “mix deps.compile exla --force”, update it with “mix deps.update exla” or clean it with “mix deps.clean exla”
    }

Any help will be really great :frowning:

@victorfonseca Unfortunately EXLA/XLA do not work out of the box on Alpine. This is because TensorFlow/LLVM don’t work well on Alpine either. I’ve gotten it to run on Alpine before, but it’s not a fun experience.

I would recommend using an Ubuntu base image if possible!

Ok thanks!