Eiji

Eiji

Using `Mix.install/2` to fetch dependencies from GitHub

[chat quote=“Myriam2002;2993;2024-05-22T08:49:27Z” channel=“Elixir Chat” channelId=“2” multiQuote=“true” chained=“true”]
hey! I am new to this community :slight_smile: I am having trouble with versions and dependencies in elixir. This error happens with many of the packages.

Mix.install([
  {:axon_onnx, "~> 0.4"},
  {:axon, "~> 0.5"},
  {:nx, "~> 0.5"},
  {:exla, "~> 0.5"},
  {:stb_image, "~> 0.6"},
  {:kino, "~> 0.8"}
])

and those errors appear could not compile dependency :axon_onnx, “mix compile” failed. Errors may have been logged above. You can recompile this dependency with “mix deps.compile axon_onnx --force”, update it with “mix deps.update axon_onnx” or clean it with “mix deps.clean axon_onnx”
[/chat]

[chat quote=“imcarlows;2994;2024-05-22T10:08:48Z” chained=“true”]
What are the errors? Maybe you got some error logs before that message?
[/chat]

[chat quote=“Eiji;2995;2024-05-22T10:40:21Z” chained=“true”]
@imcarlows You can just copy-paste it into iex.

@Myriam2002 This is a known issue. You should use latest commits:

Mix.install([axon: "~> 0.5", axon_onnx: [github: "mortont/axon_onnx"], exla: "~> 0.5", kino: "~> 0.8", nx: "~> 0.5", stb_image: "~> 0.6"])

See: Compilation error in file lib/axon_onnx/shared.ex · Issue #55 · mortont/axon_onnx · GitHub for more information
[/chat]

[chat quote=“Myriam2002;2996;2024-05-22T11:00:48Z” chained=“true”]
@Eiji Thank you!

did the same for EXLA

Mix.install([
  axon: "~> 0.5",
  axon_onnx: [github: "mortont/axon_onnx"],
  xla: [github: "elixir-nx/nx/tree/main/exla"], 
  kino: "~> 0.8", 
  nx: "~> 0.5", 
  stb_image: "~> 0.6"]) but this was the error: ** (Mix.Error) Command "git --git-dir=.git fetch --force --quiet --progress" failed
    (mix 1.15.7) lib/mix.ex:577: Mix.raise/2
    (mix 1.15.7) lib/mix/scm/git.ex:132: Mix.SCM.Git.checkout/2
    (elixir 1.15.7) lib/file.ex:1624: File.cd!/2
    (mix 1.15.7) lib/mix/dep/fetcher.ex:61: Mix.Dep.Fetcher.do_fetch/3
    (mix 1.15.7) lib/mix/dep/converger.ex:229: Mix.Dep.Converger.all/8
    (mix 1.15.7) lib/mix/dep/converger.ex:244: Mix.Dep.Converger.all/8
    (mix 1.15.7) lib/mix/dep/converger.ex:162: Mix.Dep.Converger.init_all/8
    #cell:setup:1: (file)

[/chat]

[chat quote=“Eiji;2998;2024-05-22T14:09:18Z” chained=“true”]
@Myriam2002 Firstly you cannot pass a tree path directly into this option. It accepts any string as-is, so please don’t use it blindly and read the documentation.

Before you do anything please read documentation especially Git options (:git) section of mix deps task documentation.

Here is an updated command with a correct xla repository data:

Mix.install([axon: "~> 0.5", axon_onnx: [github: "mortont/axon_onnx"], xla: [github: "elixir-nx/xla"], kino: "~> 0.8", nx: "~> 0.5", stb_image: "~> 0.6"])

[/chat]

Note: I have fixed markdown for an Elixir code in @Myriam2002 messages.
Secondly you try to get xla application giving path to exla directory. Even if below option would work as you expect it would fail anyway, because exla depends on xla and therefore you would get a weird errors that the application refers to itself.

Helpful resources

  1. Mix.install/2 function
  2. mix deps task documentation

Where Next?

Popular in Questions Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44139 214
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New

We're in Beta

About us Mission Statement