尝试使用py2exe

时间:2017-06-09 11:52:24

标签: python py2exe cx-freeze xlrd

我尝试了许多方法使我的代码可执行,我尝试了(pypinstaller,py2exe,cx_Freeze)没有任何结果,因此我专注于py2exe并且我解决了几乎所有使用这种方式时遇到的错误,但最后一个错误是我在下面附上很难解决它而且我浪费了很多时间来解决它并且我没有捕获任何结果,当我试图运行可执行文件时,我得到了一个带有以下错误的CMD窗口并且它消失了很快,请帮助我解决它或通过一种方式通知我支持(x​​lrd,openpyxl,selenium,xlsxwriter,pytesser)库我用它来执行我的代码而不是py2exe,

Traceback (most recent call last): 
 File "semiFULLTWO.py", line 8, in <module> 
 File "openpyxl\ init .pyc", line 29, in <module> 
 File "openpyxl\workbook\ init .pyc", line 5, in <module> 
 File "openpyxl\workbook\workbook.pyc", line 17, in <module> 
 File "openpyxl\writer\write_only.pyc", line 23, in <module> 
 File "openpyxl\writer\excel.pyc", line 36, in <module> 
 File "openpyxl\packaging\extended.pyc", line 4, in <module> 
ImportError: cannot import name _version_ 

我使用的图书馆:

*# -*- coding: utf-8 -*-
import os
import time
import xlrd
import base64
import urllib
import requests
import openpyxl
import xlsxwriter
from PIL import Image
from lxml import etree
from io import BytesIO
from pytesser import *
from openpyxl import Workbook
from datetime import datetime
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select*

与openpyxl lib相关的错误:

only_date = str ( dt.date ( ) )
workbook = xlsxwriter.Workbook ( only_date + '.xlsx' )
worksheet = workbook.add_worksheet ( )

0 个答案:

没有答案