Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

torch.rb not installing on Ubuntu 23.04 w. 3.2.2 #43

Closed
jcasu opened this issue Jul 29, 2023 · 4 comments
Closed

torch.rb not installing on Ubuntu 23.04 w. 3.2.2 #43

jcasu opened this issue Jul 29, 2023 · 4 comments

Comments

@jcasu
Copy link

jcasu commented Jul 29, 2023

installed libtorch-dev, etc...
gem isn't finding libtorch (see below)

any pointers would be helpful.

tnx


john@enterprise:~$ gem install torch-rb
Building native extensions. This could take a while...
ERROR: Error installing torch-rb:
ERROR: Failed to build gem native extension.

current directory: /home/john/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/torch-rb-0.13.2/ext/torch

/home/john/.rbenv/versions/3.2.2/bin/ruby extconf.rb
checking for rice/rice.hpp in /home/john/.rbenv/versions/3.2.2/lib/ruby/gems/3.2.0/gems/rice-4.1.0/include... yes
checking for -lstdc++... yes
LibTorch not found
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers. Check the mkmf.log file for more details. You may
need configuration options.

@ankane
Copy link
Owner

ankane commented Jul 29, 2023

Hi @jcasu, try these instructions (use --with-torch-dir to specify the location). Note that the latest version requires LibTorch 2, while libtorch-dev provides 1.13.

@ankane ankane closed this as completed Jul 29, 2023
@jcasu
Copy link
Author

jcasu commented Jul 29, 2023 via email

@ankane
Copy link
Owner

ankane commented Jul 29, 2023

You'll want to run bundle install after setting bundle config.

@jcasu
Copy link
Author

jcasu commented Jul 29, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants