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

Zip file is not a zip file #3

Open
runninbear5 opened this issue Aug 6, 2019 · 10 comments
Open

Zip file is not a zip file #3

runninbear5 opened this issue Aug 6, 2019 · 10 comments

Comments

@runninbear5
Copy link

runninbear5 commented Aug 6, 2019

Hi. I have been trying for a few weeks now to get pytorch on a raspberry pi and just stumbled across your article and github.

I have been trying to use your .whl files on my rpi. It is a rapsberry pi 3b+. I am running rasbian buster with python 3.7 installed.

I have run pip3 install https://github.com/nmilosev/pytorch-arm-builds/blob/master/torch-1.1.0-cp37-cp37m-linux_armv7l.whl, but it returns with an error saying raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file. (I will attach a screenshot of the entire error).

I was wondering if I was doing something incorrect or maybe there is a different way to install.

Thanks
Screenshot (29)

@nmilosev
Copy link
Owner

Looking at it, it seems file got corrupted somehow :(

It's much smaller than others. I will rebuild soon for 1.2.0 and keep an eye on this. Thanks for reporting!

@mese79
Copy link

mese79 commented Aug 19, 2019

Thank you for your efforts!
Does these wheels work on raspberry pi 3 (ARMv8) too?

@nmilosev
Copy link
Owner

Yes, but I see now that you are using the armv7 one on your RPi3? You should try the aarch64 one?

@runninbear5
Copy link
Author

I have started to go through your article on how to make my own .whl and I have had a lot of issues.

I am using an AWS EC2 instance to run fedora. The AMI I am using is ami-0eed35e1f9a917b70.

I start following the instructions and im able to run all of the installs, but it's when I get to the chroot I get confused. The uname -a returns the same as yours. I then begin to run the next lines of code, but I don't know where to run them. Do I continue to run them as the bash-5.0# or do I type exit and run as normal? I have tried both and they both have their own issues. If I continue to run in bash, it doesn't recognize git, so I tried dnf install git and also dnf install git-all. Git said it was successful, but it does not recognize the command git so I cannot get pytorch.

I then typed exit and tried again as root. This worked to download the pytorch files, but I don't seem to be able to run python setup.py bdist_wheel, it says bdist_wheel is unknown.

If you could explain what I am doing wrong or a different way/recommendation to making the wheel, that would be great.
Thanks

@nmilosev
Copy link
Owner

Do I continue to run them as the bash-5.0# or do I type exit and run as normal?

You run them inside chroot so prompt should be bash-5.0#

I have tried both and they both have their own issues. If I continue to run in bash, it doesn't recognize git, so I tried dnf install git and also dnf install git-all. Git said it was successful, but it does not recognize the command git so I cannot get pytorch.

Try dnf install /usr/bin/git

I then typed exit and tried again as root. This worked to download the pytorch files, but I don't seem to be able to run python setup.py bdist_wheel, it says bdist_wheel is unknown.

You should not build outside chroot, you have no dependencies there. To be able to build wheels you have to dnf install python3-wheel.

@runninbear5
Copy link
Author

I have looked inside of the /usr/bin folders and I noticed git is installed successfully. At least it is in the bin directory. My problem is I still cant actually use git to clone any repositories. I get fatal: open /dev/null or dup failed: No such file or directory. I have looked this up online and people are saying I need to mount dev, but I have noticed, I do not have a dev folder to mount to.

Any ideas on how to resolve this issue will be great. I am still very intrested in making these .whl files so I can transition this to make fastai work on a raspberry pi.

I am also attaching a picture of the output when I run git
Screenshot (32)

Thanks again!

@nmilosev
Copy link
Owner

I am sadly not aware why there is no /dev/null.

Probably something weird in AWS setup. If you have the time, please try running a Live Fedora installation and following the steps. Also, running a local VM could probably be better? Still, to think about it, you will use virtualization (with qemu) and I am unsure how nested VM's would work :(

That is why it would probably be best to setup a dual-boot system and try it that way on bare hardware.

Another user in another issue managed to install the armv7 whl on their RPI3, could it be your file got corrupted? There are some issues but the installation went fine.

@runninbear5
Copy link
Author

Yes, it does seem like my file was corrupted on install. I am sorry for the trouble this has caused. I am now having the same issue as in the other issue, no module named torch._C. I will check in on that issue now as well.

I will continue trying to make wheels on my own machine now as well, doing something similar to what you suggested with dual booting.

Thank you for all of the help.

@nmilosev
Copy link
Owner

nmilosev commented Aug 27, 2019

Glad you got through the first step.

Here are my thoughts, even though your hardware is 64-bit, raspbian is 32-bit. If you check other issues, we have one user with Pi3 successfully running this, but on Ubuntu ARM 64-bit. (#2) So it could be that:

a) you need aarch64 version for platform specific code
b) you cannot use it on raspbian

Still, I am unsure why the armv7 version is not working...

@soumendukrg
Copy link

soumendukrg commented Nov 24, 2019

I am facing the same 'zip file is not a zip file' when trying to install pytorch on raspi pi 0.


EDIT:
I tried pip3 install 'wheel links' and got the error....but when I downloaded this separately and copied to pi, worked fine.

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

4 participants