-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
No module named 'torch._c' #4
Comments
Raspberry Pi 3 should be ARM64, so you should use aarch64 build? |
I was unable to install the armv6l and aarch64 files because it says they are not compatible with this platform. The only one I could install was armv7l but I got the error I described above. Obs -- Raspbiain lite (my current system) is armv7l |
Could you please provide the output of |
uname -a on raspibian lite returns armv7l. |
Please see the discussion in #3 about this issue. I think you need an actual 64-bit OS to run pytorch for 64 bits. |
I also tried to install the aarch version on aarch64 ubuntu mate 64 bits for raspberry pi. Im getting error with a version of a library, when i try to import the torch ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found |
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found I get this error too. I'm using raspberrypi Buster. It seems libstdc++.so.6 in FC30 might be ahead of Buster on the raspberry pi. What could I do about this?? |
Okay, thank you for the info. Really means a lot. I checked my
Sadly not much. I don't think updating I just had a thought, what about running a chroot? I have a tool made for that called anyfed (https://github.com/nmilosev/anyfed) or you could use Docker? That could work but I can't guarantee. Anyfed hasn't been updated in a while so I will update it today if you want to try it. Of course it would be best to get Fedora on your device and use the builds that way. :) https://wiki.debian.org/Debootstrap has an option for different architecture, which means that in theory you could make a chroot with Debian in it and compile Pytorch there, similar to how I am doing it with Fedora. |
I'm trying to follow your instructions but use fc29. It might be a dumb
idea but the build isn't finished yet. I'll tell you how it goes.
…On Mon, Sep 2, 2019, 11:06 AM Nemanja Milosevic ***@***.***> wrote:
Okay, thank you for the info. Really means a lot.
I checked my glibc version and indeed it is newer:
Name : glibc
Version : 2.29
Release : 15.fc30
Architecture : x86_64
Size : 25 M
Source : glibc-2.29-15.fc30.src.rpm
Repository : @System
From repo : updates
What could I do about this??
Sadly not much. I don't think updating glibc is easy, as it would break
the rest of your system.
I just had a thought, what about running a chroot? I have a tool made for
that called anyfed (https://github.com/nmilosev/anyfed) or you could use
Docker? That could work but I can't guarantee. Anyfed hasn't been updated
in a while so I will update it today if you want to try it.
Of course it would be best to get Fedora on your device and use the builds
that way. :)
https://wiki.debian.org/Debootstrap has an option for different
architecture, which means that in theory you could make a chroot with
Debian in it and compile Pytorch there, similar to how I am doing it with
Fedora.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4?email_source=notifications&email_token=ACB527AJYBTAVKJITBWMFHTQHUTYTA5CNFSM4IOV7RX2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5WB2PY#issuecomment-527179071>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACB527EC6TJUJVRKW3RJIQLQHUTYTANCNFSM4IOV7RXQ>
.
|
Okay, great! :) Anyfed just updated to Fedora 30. Cheers |
@radiodee1 If all goes well, could you share the compiled pytorch and torchvision files? And also tell which system managed to install them. |
I am interested in running a torch model on the raspberry pi 4. It has python 3.7 I got a virtualbox instance and I installed FC29 on it. I run ubuntu. I followed the instructions for building the torch wheel, but I used FC29 everywhere that FC30 was specified. That's first. That means the one-liner in the instructions should read as follows:
After that I just followed the instructions. This took about 10 hours. Then I move the torch wheel to the pi and install with pip3. Then, you need to follow the instructions here: pytorch/pytorch#574 . Basically you need to change the names of _C and _dl after you install the library with pip3. After that it seems to work. I never tried torchvision. I hesitate to share my wheel because technically it didn't work. You still have to modify the _C and _dl files after you install. |
This is great! So this is the possible solution to this problem, albeit manual. Still, better than building from source. Thanks for your report. @marcusvlc Could you follow the instructions in the linked issue and try again? |
@radiodee1 Please share your whl so we can try it out. |
how do i share my wheel? |
@radiodee1 Thanks for you aswner, i will try it. Can you put you wheel file on a git repository (or google drive) and share with us? |
It would be best to attach it here in the issues? |
Please also try the original file for armv7? |
I forked the repo and changed/added my whl file. See here: https://github.com/radiodee1/pytorch-arm-builds . Funny thing is, the author of the commit was recorded as someone else, not me. |
I have been trying to make my own .whl files similar to what you have done and I had a lot of trouble. I see here you said
When you say you run ubuntu does that mean the machine you were running the vm on was an ubuntu machine? When I was struggling to get fedora running I was using a windows machine. Could you document how you when about setting up the virtual machine to help in the future? |
Running Fedora in a VM for this purpose would not work. You need to virtuelize ARM with qemu and nested virtualization is tricky to say at least. You have to run on bare hardware. |
Though I would agree that nested virtualization is not generally a good idea, I want to note that that is exactly what I did and I ended up with a wheel I could use. I don't recommend this for others but I wanted to note that that was my method. So I used ubuntu as my native operating system. I used virtualbox for my fist virtualization, and I used FC29 for the guest inside virtualbox. Then I used FC29 as the nested os for arm. I wanted to be really clear. |
Im trying to install torch on raspberry pi 3 B+ with your .whl files, but im gotting the following error:
No module named 'torch._c'
pytorch installs normally, the error comes up when I try to import
I searched on the internet but found nothing. Can you help me?
Im using raspibian lite, python3.7 and i alredy installed all libraries.
I tried to install the torch-1.1.0 cp37 armv7l
The text was updated successfully, but these errors were encountered: