samjabrahams / tensorflow-on-raspberry-pi

TensorFlow for Raspberry Pi
Other
2.25k stars 496 forks source link

File is not a zip file (TF 1.0.0) #84

Open wroscoe opened 7 years ago

wroscoe commented 7 years ago

Describe the Issue

When trying to install tensorflow 1.0.0 on a Rasberry Pi 3 I get an error indicating that the whl file is a Bad Zip file. I tried the same process for the 0.12.1 release seems to work (still waiting).

Steps to Reproduce

Run these commands

wget https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases/download/v1.0.0/tensorflow-1.0.0-cp34-cp34m-linux_armv7l.whl
sudo pip3 install tensorflow-1.0.0-cp34-cp34m-linux_armv7l.whl

Hardware/Software Info

Please provide the following information about your Raspberry Pi setup:

Relevant Console Output/Logs

pip install tensorflow-1.0.0-cp34-cp34m-linux_armv7l.whl
Unpacking ./tensorflow-1.0.0-cp34-cp34m-linux_armv7l.whl
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/home/pi/donkey/env/lib/python3.4/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/home/pi/donkey/env/lib/python3.4/site-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/pi/donkey/env/lib/python3.4/site-packages/pip/req.py", line 1198, in prepare_files
    do_download,
  File "/home/pi/donkey/env/lib/python3.4/site-packages/pip/req.py", line 1365, in unpack_url
    unpack_file_url(link, location, download_dir)
  File "/home/pi/donkey/env/lib/python3.4/site-packages/pip/download.py", line 640, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/home/pi/donkey/env/lib/python3.4/site-packages/pip/util.py", line 640, in unpack_file
    unzip_file(filename, location, flatten=not filename.endswith(('.pybundle', '.whl')))
  File "/home/pi/donkey/env/lib/python3.4/site-packages/pip/util.py", line 510, in unzip_file
    zip = zipfile.ZipFile(zipfp)
  File "/usr/lib/python3.4/zipfile.py", line 937, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.4/zipfile.py", line 978, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Storing debug log for failure in /home/pi/.pip/pip.log
Raulpathak commented 7 years ago

hello Sam I am also trying to install tensorflow on my raspberry pi .The error is shown below

pi@raspberrypi:~ $ sudo pip install tensorflow-1.1.0-cp27-none-linux_armv7l.whl Unpacking ./tensorflow-1.1.0-cp27-none-linux_armv7l.whl Cleaning up... Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle) File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1198, in prepare_files do_download, File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1365, in unpack_url unpack_file_url(link, location, download_dir) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 640, in unpack_file_url unpack_file(from_path, location, content_type, link) File "/usr/lib/python2.7/dist-packages/pip/util.py", line 640, in unpack_file unzip_file(filename, location, flatten=not filename.endswith(('.pybundle', '.whl'))) File "/usr/lib/python2.7/dist-packages/pip/util.py", line 510, in unzip_file zip = zipfile.ZipFile(zipfp) File "/usr/lib/python2.7/zipfile.py", line 770, in init self._RealGetContents() File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents raise BadZipfile, "File is not a zip file" BadZipfile: File is not a zip file

Kindly help me to resolve this error

wroscoe commented 7 years ago

My solution was to install an earlier release that did not give this error. https://github.com/samjabrahams/tensorflow-on-raspberry-pi/releases

samjabrahams commented 7 years ago

@Raulpathak thanks for letting me know. A few other users have had this issue pop up, and it looks like the majority of them were able to get it to work by re-downloading and trying again. See if that works, and if it doesn't, we can try other things to debug.

(Previous issues, for reference):