问题描述
在Win 10上安装Graphlab Create之后,它要求我们使用graphlab.get_dependencies()安装2个依赖项.
After installing Graphlab Create on Win 10, it asks us to install 2 dependencies using graphlab.get_dependencies().
但是,出现以下错误:
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
有人知道如何解决吗?
推荐答案
如果收到此错误,则防火墙可能阻止您下载依赖项.以下是一些信息和解决方法:
If you get this error, a firewall might be blocking you from downloading a dependency. Here is some information and a work around:
请参阅get_dependencies的SFrame源代码,以了解GraphLab如何使用此软件包: https://github.com/turicode/SFrame/blob/master/oss_src/unity/python/sframe/dependencies.py
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
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 Create安装路径中的"cython"目录中(通常在virtualenv或conda env中类似于lib/site-packages/python2.7/graphlab之类的东西).提取依赖关系后,就应该解决.
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.
这篇关于Graphlab创建安装程序错误:graphlab.get_dependencies()导致BadZipFile错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!