2016-07-27 95 views
0

在Win 10上安裝Graphlab Create之後,它要求我們使用graphlab.get_dependencies()安裝2個依賴項。Graphlab創建安裝程序錯誤:graphlab.get_dependencies()導致BadZipFile錯誤

不過,我收到以下錯誤:

 

    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 

任何人知道如何解決?

回答

0

在graphlab文件夾中使該文件夾可寫。最初它只是可讀的。轉到文件夾屬性撤消唯一讀取選項。希望它解決了您的問題。

1

如果出現此錯誤,防火牆可能會阻止您下載依賴項。下面是一些信息和周圍的工作:

請參閱get_dependencies的SFrame源代碼,看看GraphLab如何使用這個包:https://github.com/turicode/SFrame/blob/master/oss_src/unity/python/sframe/dependencies.py

在XZ工具僅用於從下載還有其他文件中提取運行時依賴(來自repo.msys2.org):http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz需要將該文件中的兩個DLL解壓縮到GraphLab創建安裝路徑(通常類似於virtualenv或conda env中的lib/site-packages/python2.7/graphlab)內的「cython」目錄中。解壓後,應該解決依賴性問題。