问题
After installing Graphlab Create on Win 10, it asks us to install 2 dependencies using graphlab.get_dependencies().
However, I am getting the following error:
In [9]: gl.get_dependencies() By running this function, you agree to the following licenses. * libstdc++: https://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html * xz: http://git.tukaani.org/?p=xz.git;a=blob;f=COPYING Downloading xz. Extracting xz. --------------------------------------------------------------------------- BadZipfile Traceback (most recent call last) in () ----> 1 gl.get_dependencies() C:\Users\nikulk\Anaconda2\envs\gl-env\lib\site-packages\graphlab\dependencies.pyc in get_dependencies() 34 xzarchive_dir = tempfile.mkdtemp() 35 print('Extracting xz.') ---> 36 xzarchive = zipfile.ZipFile(xzarchive_file) 37 xzarchive.extractall(xzarchive_dir) 38 xz = os.path.join(xzarchive_dir, 'bin_x86-64', 'xz.exe') C:\Users\nikulk\Anaconda2\envs\gl-env\lib\zipfile.pyc in __init__(self, file, mode, compression, allowZip64) 768 try: 769 if key == 'r': --> 770 self._RealGetContents() 771 elif key == 'w': 772 # set the modified flag so central directory gets written C:\Users\nikulk\Anaconda2\envs\gl-env\lib\zipfile.pyc in _RealGetContents(self) 809 raise BadZipfile("File is not a zip file") 810 if not endrec: --> 811 raise BadZipfile, "File is not a zip file" 812 if self.debug > 1: 813 print endrec BadZipfile: File is not a zip file
Anyone knows how to resolve?
回答1:
If you get this error, a firewall might be blocking you from downloading a dependency. Here is some information and a work around:
Please see the SFrame source code for get_dependencies to see how GraphLab uses this package: https://github.com/turicode/SFrame/blob/master/oss_src/unity/python/sframe/dependencies.py
The xz utility is only used to extract runtime dependencies from the other file downloaded there (from repo.msys2.org): http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz. Two DLLs from that file need to be extracted into the "cython" directory inside the GraphLab Create install path (typically something like lib/site-packages/python2.7/graphlab within a virtualenv or conda env). Once extracted the dependency issue should be resolved.
回答2:
In graphlab folder make the folder writable.Initially it is only readable.Go to properties of folder undo the only read option.Hope it solve your problem.
来源:https://stackoverflow.com/questions/38603280/graphlab-create-setup-error-graphlab-get-dependencies-results-in-badzipfile-e