karang
Hello, I have been trying to get Exla installed for use with Nx and Axon. I am running Ubuntu 20 and I have read through the instructions and installed exla’s system dependencies (build-essential, erlang-dev, bazel 3.7.2, python3 and numpy, direnv) but when I compile exla I get this error:
ERROR: /home/karang/.cache/bazel/_bazel_karang/0cbb144c3d68d1f180f564ed331d591d/external/llvm-project/llvm/BUILD:46:18: Executing genrule @llvm-project//llvm:config_gen failed (Exit 1): bash failed: error executing command /bin/bash -c ... (remaining 1 argument(s) skipped)
unknown command: python3. Perhaps you have to reshim?
----------------
Note: The failure of target //third_party/llvm:expand_cmake_vars (with exit code 1) may have been caused by the fact that it is running under Python 3 instead of Python 2. Examine the error to determine if that appears to be the problem. Since this target is built in the host configuration, the only way to change its version is to set --host_force_python=PY2, which affects the entire build.
If this error started occurring in Bazel 0.27 and later, it may be because the Python toolchain now enforces that targets analyzed as PY2 and PY3 run under a Python 2 and Python 3 interpreter, respectively. See https://github.com/bazelbuild/bazel/issues/7899 for more information.
----------------
Target //tensorflow/compiler/xla/exla:libexla.so failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 9.398s, Critical Path: 8.88s
INFO: 96 processes: 16 internal, 80 local.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
make: *** [Makefile:32: all] Error 1
could not compile dependency :exla, "mix compile" failed. 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"
==> ml_test
** (Mix) Could not compile with "make" (exit status: 2).
You need to have gcc and make installed. If you are using
Ubuntu or any other Debian-based system, install the packages
"build-essential". Also install "erlang-dev" package if not
included in your Erlang/OTP version. If you're on Fedora, run
"dnf group install 'Development Tools'".
At first it couldn’t find python so I used the asdf direnv trick but now it says it can’t find python3.
here is my .tools-version
erlang 24.0.1
elixir 1.12.1-otp-24
python 3.9.5
bazel 3.7.2
Has anyone managed to get EXLA working in ubuntu? Thank you!
Trending in Questions
Hello!
Suppose you are building workflow (order / task / payment) processing system with the following requirements:
Each workflow con...
New
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Kia ora,
We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
Hello,
I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New
Other Trending Topics
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
There are three potential reasons for members of this forum to have a look at https://vutuv.de
You are tired or annoyed of LinkedIn.
Yo...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 10 of 17 Posts
josevalim
How did you install python3? The error message says it is not available and you have to reshim it, which may be a requirement depending on the tool you used to install it.
outlog
@karang it cant find python3 - maybe this section in the exla readme can be helpful nx/exla at main · elixir-nx/nx · GitHub
do keep us posted if it works, and/or readme needs updating..
karang
Thanks guys! I used asdf to install python and method 2 as per above to to deal with it. I installed direnv and set the tools versions in my mix project. I just cleared the cache and tried again and it gave me the same error. So I tried to remove the python plugin from asdf but this does not remove the shims and then bazel complains that the shims don’t exist. So i reinstalled python with asdf and double check my direnv setup to make sure the PATH is set correctly and bazel still can’t find python3. I’ll let you know if I get it to work but so far method 2 has not worked for me and I am not sure which directory I can add to my path if I wanted to use method 1.
MrDoops
I’m running into the same errors using Ubuntu 20.04, RocM + Tensorflow, asdf managed Python and Bazel as described above. I’ve also tried aliasing ‘python’ to ‘python3’ but same scenario.
shotleybuilder
I’m on Ubuntu 20.04 too. I think I’ve progressed further than @MrDoops but the behaviour did surprise me a little.
mix deps.compileon a new project with Nx, EXLA and Axon as dependencies generated this output. I’m not sure if it finished, I let it run for about 4 hours!Just not sure what I should have expected to happen.
Oh, I can’t attest to this being helpful but I did
export PYTHON_BIN_PATH=/usr/bin/python3.8seanmor5
That’s the correct output, EXLA takes a really long to compile (it has to compile a lot of TensorFlow). When it finishes you’ll see an output with something like
Linking libexla.so.shotleybuilder
Hey, that’s good to know, finishing off this morning
karang
This really helped me! It is now compiling! All the fans are running!
karang
It seems now bazel can find python after running the above command but a new problem has arisen. When exla starts compiling I start up htop to watch my memory and cpu usage and I see all cores running at close to 100% and then at some point (always different) RAM will get filled up and the compilation crashes. I have 16G ram and 16 cores on my machine this should be enough right? How can I avoid running out of memory during exla compilation? Thank you!!
seanmor5
Check here: Memory-saving Mode - Bazel main
EXLA looks for BAZEL_FLAGS so you can set any of those flags by setting BAZEL_FLAGS as an environment variable