Skip to content Skip to sidebar Skip to footer

Can't Make Standalone Binary Scrapy Spider With Cx_freeze

A short description about my working environment: win 7 x64, python 2.7 x64, scrapy 0.22, cx_Freeze 4.3.2. First, I developed a simple crawl-spider and it works fine. Then, using t

Solution 1:

Replace your cx_Freeze code with this.

import sys 
    from cx_Freeze import setup, Executable 
    build_exe_options = {"packages": ["os","twisted","scrapy","test"], "excludes": ["tkinter"],"include_msvcr":True} 

    base = None
    setup(  name = "MyScript", 
            version = "0.1",
            description = "Demo", 
            options = {"build_exe": build_exe_options}, 
            executables = [Executable("C:\\MyScript", base=base)]) 

The difference in code is I have included the whole of the packages so you can access all functions from them.

Post a Comment for "Can't Make Standalone Binary Scrapy Spider With Cx_freeze"