Eiji

Eiji

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

Originally sent in Elixir Chat
Myriam2002

hey! I am new to this community :) 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"

imcarlows

What are the errors? Maybe you got some error logs before that message?

Eiji

@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

Myriam2002

@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)
Eiji

@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"])

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

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
pgiesin
This should be a simple problem but I just can’t seem to figure it out. I have a standalone Elixir app that won’t find the database. Dep...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
chrisalley
ExUnit now has describe blocks which is a welcome addition coming from RSpec. In the docs, it states that nested hierarchies of describe ...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Codball
Mix format works fine if run from the cmd. I’ve followed this to facilitate the implementation into VSC which involves downloading an ext...
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New

Other popular topics Top

sergio
In Ruby, I can go: User.find_by(email: "foobar@email.com").update(email: "hello@email.com") How can I do something similar in Elixir? ...
New
yawaramin
In the Dialyzer docs ( http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files ), there is a way to tu...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: https://hexdocs.pm/ecto/Ecto.Schema.html#module-...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
New
Fl4m3Ph03n1x
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: ) Hello all, this is ...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New

We're in Beta

About us Mission Statement