- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
这与 cx_freeze error with pyodbc 几乎完全相同除了添加小数作为特定包含不起作用:卡住正常,但是当尝试运行可执行文件时,我得到:
Traceback (most recent call last):
File "C:\Python34\lib\site-packages\cx_Freeze\initscripts\Console.py", line 27
, in <module>
exec(code, m.__dict__)
File "my_program.py", line 9, in <module>
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 2214, in _find_a
nd_load
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 2203, in _find_a
nd_load_unlocked
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 1191, in _load_u
nlocked
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 1161, in _load_b
ackward_compatible
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 539, in _check_n
ame_wrapper
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 1692, in load_mo
dule
File "c:\python\32-bit\3.4\lib\importlib\_bootstrap.py", line 321, in _call_wi
th_frames_removed
RuntimeError: Unable to import decimal
当我添加十进制作为包含时,我看到输出文件夹中包含 _decimal.pyd
,但仍然出现相同的运行时错误。
这是我的 setup.py:
import sys
from cx_Freeze import setup, Executable
build_exe_options = {
'includes': ['decimal'],
'include_files': ['connection settings.cfg']
}
setup(name = 'my_program',
version = '0.0.1',
description = """This program does stuff.""",
options = {'build_exe':build_exe_options},
executables = [Executable('my_program.py')]
)
我正在使用:
更新:这是构建时的输出:
C:\Users\my_name\Documents\Python>python my_program.py build
running build
running build_exe
creating directory build\exe.win32-3.4
copying C:\Python34\lib\site-packages\cx_Freeze\bases\Console.exe -> build\exe.w
in32-3.4\my_program.exe
copying C:\Windows\system32\python34.dll -> build\exe.win32-3.4\python34.dll
*** WARNING *** unable to create version resource
install pywin32 extensions first
writing zip file build\exe.win32-3.4\library.zip
Name File
---- ----
m BUILD_CONSTANTS
m ConfigParser C:\Python34\lib\ConfigParser.py
m __future__ C:\Python34\lib\__future__.py
m _ast
m _bisect
m _bootlocale
m _bz2 C:\Python34\DLLs\_bz2.pyd
m _codecs
m _codecs_cn
m _codecs_hk
m _codecs_iso2022
m _codecs_jp
m _codecs_kr
m _codecs_tw
m _collections
m _collections_abc
m _datetime
m _decimal C:\Python34\DLLs\_decimal.pyd
m _dummy_thread
m _functools
m _hashlib C:\Python34\DLLs\_hashlib.pyd
m _heapq
m _imp
m _io
m _locale
m _lzma C:\Python34\DLLs\_lzma.pyd
m _md5
m _multibytecodec
m _opcode
m _operator
m _osx_support C:\Python34\lib\_osx_support.py
m _random
m _sha1
m _sha256
m _sha512
m _socket C:\Python34\DLLs\_socket.pyd
m _sre
m _ssl C:\Python34\DLLs\_ssl.pyd
m _stat
m _string
m _strptime
m _struct
m _thread
m _threading_local
m _warnings
m _weakref
m _weakrefset
m _winapi
m abc
m argparse
m array
m ast C:\Python34\lib\ast.py
m atexit
m base64
m bdb C:\Python34\lib\bdb.py
m binascii
m bisect C:\Python34\lib\bisect.py
m builtins
m bz2
m calendar
m cmd C:\Python34\lib\cmd.py
m code C:\Python34\lib\code.py
m codecs
m codeop C:\Python34\lib\codeop.py
P collections
m collections.abc
m configparser C:\Python34\lib\configparser.py
m contextlib
m copy
m copyreg
m cx_Freeze__init__ C:\Python34\lib\site-packages\cx_Freeze\initscripts\
Console.py
m datetime
m decimal C:\Python34\lib\decimal.py
m difflib C:\Python34\lib\difflib.py
m dis C:\Python34\lib\dis.py
P distutils C:\Python34\lib\distutils\__init__.py
m distutils.debug C:\Python34\lib\distutils\debug.py
m distutils.errors C:\Python34\lib\distutils\errors.py
m distutils.log C:\Python34\lib\distutils\log.py
m distutils.spawn C:\Python34\lib\distutils\spawn.py
m distutils.sysconfig C:\Python34\lib\distutils\sysconfig.py
m distutils.text_file C:\Python34\lib\distutils\text_file.py
m doctest C:\Python34\lib\doctest.py
m dummy_threading
P email C:\Python34\lib\email\__init__.py
m email._encoded_words C:\Python34\lib\email\_encoded_words.py
m email._header_value_parser C:\Python34\lib\email\_header_value_parser.py
m email._parseaddr C:\Python34\lib\email\_parseaddr.py
m email._policybase C:\Python34\lib\email\_policybase.py
m email.base64mime C:\Python34\lib\email\base64mime.py
m email.charset C:\Python34\lib\email\charset.py
m email.contentmanager C:\Python34\lib\email\contentmanager.py
m email.encoders C:\Python34\lib\email\encoders.py
m email.errors C:\Python34\lib\email\errors.py
m email.feedparser C:\Python34\lib\email\feedparser.py
m email.generator C:\Python34\lib\email\generator.py
m email.header C:\Python34\lib\email\header.py
m email.headerregistry C:\Python34\lib\email\headerregistry.py
m email.iterators C:\Python34\lib\email\iterators.py
m email.message C:\Python34\lib\email\message.py
m email.parser C:\Python34\lib\email\parser.py
m email.policy C:\Python34\lib\email\policy.py
m email.quoprimime C:\Python34\lib\email\quoprimime.py
m email.utils C:\Python34\lib\email\utils.py
P encodings
m encodings.aliases
m encodings.ascii
m encodings.base64_codec
m encodings.big5
m encodings.big5hkscs
m encodings.bz2_codec
m encodings.charmap
m encodings.cp037
m encodings.cp1006
m encodings.cp1026
m encodings.cp1125
m encodings.cp1140
m encodings.cp1250
m encodings.cp1251
m encodings.cp1252
m encodings.cp1253
m encodings.cp1254
m encodings.cp1255
m encodings.cp1256
m encodings.cp1257
m encodings.cp1258
m encodings.cp273
m encodings.cp424
m encodings.cp437
m encodings.cp500
m encodings.cp65001
m encodings.cp720
m encodings.cp737
m encodings.cp775
m encodings.cp850
m encodings.cp852
m encodings.cp855
m encodings.cp856
m encodings.cp857
m encodings.cp858
m encodings.cp860
m encodings.cp861
m encodings.cp862
m encodings.cp863
m encodings.cp864
m encodings.cp865
m encodings.cp866
m encodings.cp869
m encodings.cp874
m encodings.cp875
m encodings.cp932
m encodings.cp949
m encodings.cp950
m encodings.euc_jis_2004
m encodings.euc_jisx0213
m encodings.euc_jp
m encodings.euc_kr
m encodings.gb18030
m encodings.gb2312
m encodings.gbk
m encodings.hex_codec
m encodings.hp_roman8
m encodings.hz
m encodings.idna
m encodings.iso2022_jp
m encodings.iso2022_jp_1
m encodings.iso2022_jp_2
m encodings.iso2022_jp_2004
m encodings.iso2022_jp_3
m encodings.iso2022_jp_ext
m encodings.iso2022_kr
m encodings.iso8859_1
m encodings.iso8859_10
m encodings.iso8859_11
m encodings.iso8859_13
m encodings.iso8859_14
m encodings.iso8859_15
m encodings.iso8859_16
m encodings.iso8859_2
m encodings.iso8859_3
m encodings.iso8859_4
m encodings.iso8859_5
m encodings.iso8859_6
m encodings.iso8859_7
m encodings.iso8859_8
m encodings.iso8859_9
m encodings.johab
m encodings.koi8_r
m encodings.koi8_u
m encodings.latin_1
m encodings.mac_arabic
m encodings.mac_centeuro
m encodings.mac_croatian
m encodings.mac_cyrillic
m encodings.mac_farsi
m encodings.mac_greek
m encodings.mac_iceland
m encodings.mac_latin2
m encodings.mac_roman
m encodings.mac_romanian
m encodings.mac_turkish
m encodings.mbcs
m encodings.palmos
m encodings.ptcp154
m encodings.punycode
m encodings.quopri_codec
m encodings.raw_unicode_escape
m encodings.rot_13
m encodings.shift_jis
m encodings.shift_jis_2004
m encodings.shift_jisx0213
m encodings.tis_620
m encodings.undefined
m encodings.unicode_escape
m encodings.unicode_internal
m encodings.utf_16
m encodings.utf_16_be
m encodings.utf_16_le
m encodings.utf_32
m encodings.utf_32_be
m encodings.utf_32_le
m encodings.utf_7
m encodings.utf_8
m encodings.utf_8_sig
m encodings.uu_codec
m encodings.zlib_codec
m enum C:\Python34\lib\enum.py
m errno
m fnmatch C:\Python34\lib\fnmatch.py
m ftplib C:\Python34\lib\ftplib.py
m functools
m gc
m genericpath
m getopt C:\Python34\lib\getopt.py
m getpass C:\Python34\lib\getpass.py
m gettext
m glob C:\Python34\lib\glob.py
m gzip C:\Python34\lib\gzip.py
m hashlib C:\Python34\lib\hashlib.py
m heapq
P html C:\Python34\lib\html\__init__.py
m html.entities C:\Python34\lib\html\entities.py
P http C:\Python34\lib\http\__init__.py
m http.client C:\Python34\lib\http\client.py
m http.cookiejar C:\Python34\lib\http\cookiejar.py
m http.server C:\Python34\lib\http\server.py
m imp C:\Python34\lib\imp.py
P importlib C:\Python34\lib\importlib\__init__.py
P importlib C:\Python34\lib\importlib\__init__.py
m importlib._bootstrap
m importlib._bootstrap C:\Python34\lib\importlib\_bootstrap.py
m importlib.machinery C:\Python34\lib\importlib\machinery.py
m importlib.util C:\Python34\lib\importlib\util.py
m inspect C:\Python34\lib\inspect.py
m io
m itertools
m keyword
m linecache
m locale
P logging C:\Python34\lib\logging\__init__.py
m lzma C:\Python34\lib\lzma.py
m my_program__main__ my_program.py
m marshal
m math
m mimetypes C:\Users\clee\Documents\Python\mimetypes.py
m msvcrt
m nt
m ntpath
m nturl2path C:\Python34\lib\nturl2path.py
m numbers C:\Python34\lib\numbers.py
m opcode C:\Python34\lib\opcode.py
m operator
m optparse
m os
m pdb C:\Python34\lib\pdb.py
m pkgutil C:\Python34\lib\pkgutil.py
m platform C:\Python34\lib\platform.py
m plistlib C:\Python34\lib\plistlib.py
m posixpath
m pprint C:\Python34\lib\pprint.py
m py_compile C:\Python34\lib\py_compile.py
m pydoc C:\Python34\lib\pydoc.py
P pydoc_data C:\Python34\lib\pydoc_data\__init__.py
m pydoc_data.topics C:\Python34\lib\pydoc_data\topics.py
m pyexpat C:\Python34\DLLs\pyexpat.pyd
m pyodbc C:\Python34\lib\site-packages\pyodbc-3.0.7-py3.4-win
32.egg\pyodbc.pyd
m quopri
m random C:\Python34\lib\random.py
m re
m reprlib
m select C:\Python34\DLLs\select.pyd
m selectors C:\Python34\lib\selectors.py
m shlex C:\Python34\lib\shlex.py
m shutil C:\Python34\lib\shutil.py
m signal
m socket C:\Python34\lib\socket.py
m socketserver C:\Python34\lib\socketserver.py
m sre_compile
m sre_constants
m sre_parse
m ssl C:\Python34\lib\ssl.py
m stat
m string
m stringprep
m struct
m subprocess C:\Python34\lib\subprocess.py
m sys
m tarfile C:\Python34\lib\tarfile.py
m tempfile C:\Python34\lib\tempfile.py
m textwrap
m threading
m time
m token
m tokenize
m traceback
m tty C:\Python34\lib\tty.py
m types
m unicodedata C:\Python34\DLLs\unicodedata.pyd
P unittest C:\Python34\lib\unittest\__init__.py
m unittest.case C:\Python34\lib\unittest\case.py
m unittest.loader C:\Python34\lib\unittest\loader.py
m unittest.main C:\Python34\lib\unittest\main.py
m unittest.result C:\Python34\lib\unittest\result.py
m unittest.runner C:\Python34\lib\unittest\runner.py
m unittest.signals C:\Python34\lib\unittest\signals.py
m unittest.suite C:\Python34\lib\unittest\suite.py
m unittest.util C:\Python34\lib\unittest\util.py
P urllib C:\Python34\lib\urllib\__init__.py
m urllib.error C:\Python34\lib\urllib\error.py
m urllib.parse C:\Python34\lib\urllib\parse.py
m urllib.request C:\Python34\lib\urllib\request.py
m urllib.response C:\Python34\lib\urllib\response.py
m uu C:\Python34\lib\uu.py
m warnings
m weakref
m webbrowser C:\Python34\lib\webbrowser.py
m winreg
P xml C:\Python34\lib\xml\__init__.py
P xml.dom C:\Python34\lib\xml\dom\__init__.py
m xml.dom.NodeFilter C:\Python34\lib\xml\dom\NodeFilter.py
m xml.dom.domreg C:\Python34\lib\xml\dom\domreg.py
m xml.dom.expatbuilder C:\Python34\lib\xml\dom\expatbuilder.py
m xml.dom.minicompat C:\Python34\lib\xml\dom\minicompat.py
m xml.dom.minidom C:\Python34\lib\xml\dom\minidom.py
m xml.dom.pulldom C:\Python34\lib\xml\dom\pulldom.py
m xml.dom.xmlbuilder C:\Python34\lib\xml\dom\xmlbuilder.py
P xml.parsers C:\Python34\lib\xml\parsers\__init__.py
m xml.parsers.expat C:\Python34\lib\xml\parsers\expat.py
P xml.sax C:\Python34\lib\xml\sax\__init__.py
m xml.sax._exceptions C:\Python34\lib\xml\sax\_exceptions.py
m xml.sax.expatreader C:\Python34\lib\xml\sax\expatreader.py
m xml.sax.handler C:\Python34\lib\xml\sax\handler.py
m xml.sax.saxutils C:\Python34\lib\xml\sax\saxutils.py
m xml.sax.xmlreader C:\Python34\lib\xml\sax\xmlreader.py
m zipfile C:\Python34\lib\zipfile.py
m zipimport
m zlib
Missing modules:
? __main__ imported from bdb, pdb
? _dummy_threading imported from dummy_threading
? _posixsubprocess imported from subprocess
? _scproxy imported from urllib.request
? ce imported from os
? grp imported from shutil, tarfile
? java.lang imported from platform, xml.sax._exceptions
? org.python.core imported from copy, xml.sax
? os.path imported from os, pkgutil, py_compile, shutil, unittest.util
? posix imported from os
? pwd imported from getpass, http.server, posixpath, shutil, tarfile, webbrowser
? termios imported from getpass, tty
? vms_lib imported from platform
? win32api imported from platform
? win32con imported from platform
This is not necessarily a problem - the modules may not be needed on this platfo
rm.
C:\Python34\lib\site-packages\cx_Freeze\freezer.py:574: UserWarning: Duplicate n
ame: 'importlib/__init__.pyc'
outFile.writestr(zinfo, data)
copying C:\Python34\DLLs\_bz2.pyd -> build\exe.win32-3.4\_bz2.pyd
copying C:\Python34\DLLs\_decimal.pyd -> build\exe.win32-3.4\_decimal.pyd
copying C:\Python34\DLLs\_hashlib.pyd -> build\exe.win32-3.4\_hashlib.pyd
copying C:\Python34\DLLs\_lzma.pyd -> build\exe.win32-3.4\_lzma.pyd
copying C:\Python34\DLLs\_socket.pyd -> build\exe.win32-3.4\_socket.pyd
copying C:\Python34\DLLs\_ssl.pyd -> build\exe.win32-3.4\_ssl.pyd
copying C:\Python34\DLLs\pyexpat.pyd -> build\exe.win32-3.4\pyexpat.pyd
copying C:\Python34\lib\site-packages\pyodbc-3.0.7-py3.4-win32.egg\pyodbc.pyd ->
build\exe.win32-3.4\pyodbc.pyd
copying C:\Python34\DLLs\select.pyd -> build\exe.win32-3.4\select.pyd
copying C:\Python34\DLLs\unicodedata.pyd -> build\exe.win32-3.4\unicodedata.pyd
copying connection settings.cfg -> build\exe.win32-3.4\connection settings.cfg
最佳答案
我在非常相似的设置中遇到了同样的问题,唯一可以使其工作的方法是将 importdecimal 添加到我的 python 脚本中,尝试将 importdecimal 添加到 my_program.py
关于python - pyodbc python 3.4 出现 cx_freeze 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25559947/
我已经使用 vue-cli 两个星期了,直到今天一切正常。我在本地建立这个项目。 https://drive.google.com/open?id=0BwGw1zyyKjW7S3RYWXRaX24tQ
您好,我正在尝试使用 python 库 pytesseract 从图像中提取文本。请找到代码: from PIL import Image from pytesseract import image_
我的错误 /usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches non-TLS reference
我已经训练了一个模型,我正在尝试使用 predict函数但它返回以下错误。 Error in contrasts<-(*tmp*, value = contr.funs[1 + isOF[nn]])
根据Microsoft DataConnectors的信息我想通过 this ODBC driver 创建一个从 PowerBi 到 PostgreSQL 的连接器使用直接查询。我重用了 Micros
我已经为 SoundManagement 创建了一个包,其中有一个扩展 MediaPlayer 的类。我希望全局控制这个变量。这是我的代码: package soundmanagement; impo
我在Heroku上部署了一个应用程序。我正在使用免费服务。 我经常收到以下错误消息。 PG::Error: ERROR: out of memory 如果刷新浏览器,就可以了。但是随后,它又随机发生
我正在运行 LAMP 服务器,这个 .htaccess 给我一个 500 错误。其作用是过滤关键字并重定向到相应的域名。 Options +FollowSymLinks RewriteEngine
我有两个驱动器 A 和 B。使用 python 脚本,我在“A”驱动器中创建一些文件,并运行 powerscript,该脚本以 1 秒的间隔将驱动器 A 中的所有文件复制到驱动器 B。 我在 powe
下面的函数一直返回这个错误信息。我认为可能是 double_precision 字段类型导致了这种情况,我尝试使用 CAST,但要么不是这样,要么我没有做对...帮助? 这是错误: ERROR: i
这个问题已经有答案了: Syntax error due to using a reserved word as a table or column name in MySQL (1 个回答) 已关闭
我的数据库有这个小问题。 我创建了一个表“articoli”,其中包含商品的品牌、型号和价格。 每篇文章都由一个 id (ID_ARTICOLO)` 定义,它是一个自动递增字段。 好吧,现在当我尝试插
我是新来的。我目前正在 DeVry 在线学习中级 C++ 编程。我们正在使用 C++ Primer Plus 这本书,到目前为止我一直做得很好。我的老师最近向我们扔了一个曲线球。我目前的任务是这样的:
这个问题在这里已经有了答案: What is an undefined reference/unresolved external symbol error and how do I fix it?
我的网站中有一段代码有问题;此错误仅发生在 Internet Explorer 7 中。 我没有在这里发布我所有的 HTML/CSS 标记,而是发布了网站的一个版本 here . 如您所见,我在列中有
如果尝试在 USB 设备上构建 node.js 应用程序时在我的树莓派上使用 npm 时遇到一些问题。 package.json 看起来像这样: { "name" : "node-todo",
在 Python 中,您有 None单例,在某些情况下表现得很奇怪: >>> a = None >>> type(a) >>> isinstance(a,None) Traceback (most
这是我的 build.gradle (Module:app) 文件: apply plugin: 'com.android.application' android { compileSdkV
我是 android 的新手,我的项目刚才编译和运行正常,但在我尝试实现抽屉导航后,它给了我这个错误 FAILURE: Build failed with an exception. What wen
谁能解释一下?我想我正在做一些非常愚蠢的事情,并且急切地等待着启蒙。 我得到这个输出: phpversion() == 7.2.25-1+0~20191128.32+debian8~1.gbp108
我是一名优秀的程序员,十分优秀!