trying to install pycuda, getting zip error?

hmmmbob picture hmmmbob · Jan 20, 2016 · Viewed 22.3k times · Source

windows 10, python 2.7 64 bit

hello, following a guide to this step :

pip install pipwin
pipwin install pycuda

gives me those options

Package `pycuda` found in cache
Choose version to download.

[0] : 2014.1+cuda6514
[1] : 2015.1.3+cuda7518

no matter what i choose , i get the following error(last line):

  File "c:\users\skpok\anaconda2\lib\zipfile.py", line 811, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file

Anyone knows this mistake?

Answer

Chaithanya Kumar picture Chaithanya Kumar · Jan 29, 2017

try: pip install --no-cache-dir <package_name>, it will work

when you try to pip install , first pip will check the pip cache for the package. if the package is found and fresh, pip will grap the .whl file for the package and try to install. this results in badzipfile as a .zip file is excepted.

try pip install in verbose mode pip install <some_package> -vvvv. you can see that it will first try to install from cache