python – 从py2exe’d程序连接到Oracle时出错:无法获取Oracle环境句柄

当我使用 Python解释器运行它时,我的python程序(Python 2.6)工作正常,它连接到Oracle数据库(10g XE)而没有错误.但是,当我使用py2exe编译它时,可执行版本在调用cx_Oracle.connect()时失败并显示“无法获取Oracle环境句柄”.

我没有高兴地试过以下事情:

> Oracle即时客户端10g和11g
> Oracle XE客户端
>重新安装cx_Oracle-5.0.2-10g.win32-py2.6.msi
>设置ORACLE_HOME以及PATH
>另一台只有Oracle客户端和exe的计算机
>构建exe的各种选项(无压缩和/或使用zip文件)

我的测试用例:

testora.py:

import cx_Oracle
import decimal # needed for py2exe to compile this correctly

def testora():
    """testora

    >>> testora.testora()
    <cx_Oracle.Connection to scott@localhost:1521/orcl>
    X
    """
    orcl = cx_Oracle.connect('scott/tiger@localhost:1521/orcl')
    print orcl
    curs = orcl.cursor()
    result = curs.execute('SELECT * FROM DUAL')
    for (dummy,) in result:
        print dummy

if __name__ == '__main__':
    testora()

build_testora.py:

from distutils.core import setup
import py2exe,sys

sys.argv.append('py2exe')

setup(
    options = {'py2exe': {
        'bundle_files': 2,'compressed': True
        }},console = [{'script': "testora.py"}],zipfile = None
    )

结果:

C:\Python26\working>python testora.py
<cx_Oracle.Connection to scott@localhost:1521/orcl>
X

C:\Python26\working>python build_testora.py py2exe
C:\Python26\lib\site-packages\py2exe\build_exe.py:16: DeprecationWarning: the se
ts module is deprecated
  import sets
running py2exe
creating C:\Python26\working\build
creating C:\Python26\working\build\bdist.win32
creating C:\Python26\working\build\bdist.win32\winexe
creating C:\Python26\working\build\bdist.win32\winexe\collect-2.6
creating C:\Python26\working\build\bdist.win32\winexe\bundle-2.6
creating C:\Python26\working\build\bdist.win32\winexe\temp
*** searching for required modules ***
*** parsing results ***
*** finding dlls needed ***
*** create binaries ***
*** byte compile python files ***
byte-compiling C:\Python26\lib\StringIO.py to StringIO.pyc
byte-compiling C:\Python26\lib\UserDict.py to UserDict.pyc
byte-compiling C:\Python26\lib\__future__.py to __future__.pyc
byte-compiling C:\Python26\lib\_abcoll.py to _abcoll.pyc
byte-compiling C:\Python26\lib\_strptime.py to _strptime.pyc
byte-compiling C:\Python26\lib\_threading_local.py to _threading_local.pyc
byte-compiling C:\Python26\lib\abc.py to abc.pyc
byte-compiling C:\Python26\lib\atexit.py to atexit.pyc
byte-compiling C:\Python26\lib\base64.py to base64.pyc
byte-compiling C:\Python26\lib\bdb.py to bdb.pyc
byte-compiling C:\Python26\lib\bisect.py to bisect.pyc
byte-compiling C:\Python26\lib\calendar.py to calendar.pyc
byte-compiling C:\Python26\lib\cmd.py to cmd.pyc
byte-compiling C:\Python26\lib\codecs.py to codecs.pyc
byte-compiling C:\Python26\lib\collections.py to collections.pyc
byte-compiling C:\Python26\lib\copy.py to copy.pyc
byte-compiling C:\Python26\lib\copy_reg.py to copy_reg.pyc
byte-compiling C:\Python26\lib\decimal.py to decimal.pyc
byte-compiling C:\Python26\lib\difflib.py to difflib.pyc
byte-compiling C:\Python26\lib\dis.py to dis.pyc
byte-compiling C:\Python26\lib\doctest.py to doctest.pyc
byte-compiling C:\Python26\lib\dummy_thread.py to dummy_thread.pyc
byte-compiling C:\Python26\lib\encodings\__init__.py to encodings\__init__.pyc
creating C:\Python26\working\build\bdist.win32\winexe\collect-2.6\encodings
byte-compiling C:\Python26\lib\encodings\aliases.py to encodings\aliases.pyc
byte-compiling C:\Python26\lib\encodings\ascii.py to encodings\ascii.pyc
byte-compiling C:\Python26\lib\encodings\base64_codec.py to encodings\base64_cod
ec.pyc
byte-compiling C:\Python26\lib\encodings\big5.py to encodings\big5.pyc
byte-compiling C:\Python26\lib\encodings\big5hkscs.py to encodings\big5hkscs.pyc

byte-compiling C:\Python26\lib\encodings\bz2_codec.py to encodings\bz2_codec.pyc

byte-compiling C:\Python26\lib\encodings\charmap.py to encodings\charmap.pyc
byte-compiling C:\Python26\lib\encodings\cp037.py to encodings\cp037.pyc
byte-compiling C:\Python26\lib\encodings\cp1006.py to encodings\cp1006.pyc
byte-compiling C:\Python26\lib\encodings\cp1026.py to encodings\cp1026.pyc
byte-compiling C:\Python26\lib\encodings\cp1140.py to encodings\cp1140.pyc
byte-compiling C:\Python26\lib\encodings\cp1250.py to encodings\cp1250.pyc
byte-compiling C:\Python26\lib\encodings\cp1251.py to encodings\cp1251.pyc
byte-compiling C:\Python26\lib\encodings\cp1252.py to encodings\cp1252.pyc
byte-compiling C:\Python26\lib\encodings\cp1253.py to encodings\cp1253.pyc
byte-compiling C:\Python26\lib\encodings\cp1254.py to encodings\cp1254.pyc
byte-compiling C:\Python26\lib\encodings\cp1255.py to encodings\cp1255.pyc
byte-compiling C:\Python26\lib\encodings\cp1256.py to encodings\cp1256.pyc
byte-compiling C:\Python26\lib\encodings\cp1257.py to encodings\cp1257.pyc
byte-compiling C:\Python26\lib\encodings\cp1258.py to encodings\cp1258.pyc
byte-compiling C:\Python26\lib\encodings\cp424.py to encodings\cp424.pyc
byte-compiling C:\Python26\lib\encodings\cp437.py to encodings\cp437.pyc
byte-compiling C:\Python26\lib\encodings\cp500.py to encodings\cp500.pyc
byte-compiling C:\Python26\lib\encodings\cp737.py to encodings\cp737.pyc
byte-compiling C:\Python26\lib\encodings\cp775.py to encodings\cp775.pyc
byte-compiling C:\Python26\lib\encodings\cp850.py to encodings\cp850.pyc
byte-compiling C:\Python26\lib\encodings\cp852.py to encodings\cp852.pyc
byte-compiling C:\Python26\lib\encodings\cp855.py to encodings\cp855.pyc
byte-compiling C:\Python26\lib\encodings\cp856.py to encodings\cp856.pyc
byte-compiling C:\Python26\lib\encodings\cp857.py to encodings\cp857.pyc
byte-compiling C:\Python26\lib\encodings\cp860.py to encodings\cp860.pyc
byte-compiling C:\Python26\lib\encodings\cp861.py to encodings\cp861.pyc
byte-compiling C:\Python26\lib\encodings\cp862.py to encodings\cp862.pyc
byte-compiling C:\Python26\lib\encodings\cp863.py to encodings\cp863.pyc
byte-compiling C:\Python26\lib\encodings\cp864.py to encodings\cp864.pyc
byte-compiling C:\Python26\lib\encodings\cp865.py to encodings\cp865.pyc
byte-compiling C:\Python26\lib\encodings\cp866.py to encodings\cp866.pyc
byte-compiling C:\Python26\lib\encodings\cp869.py to encodings\cp869.pyc
byte-compiling C:\Python26\lib\encodings\cp874.py to encodings\cp874.pyc
byte-compiling C:\Python26\lib\encodings\cp875.py to encodings\cp875.pyc
byte-compiling C:\Python26\lib\encodings\cp932.py to encodings\cp932.pyc
byte-compiling C:\Python26\lib\encodings\cp949.py to encodings\cp949.pyc
byte-compiling C:\Python26\lib\encodings\cp950.py to encodings\cp950.pyc
byte-compiling C:\Python26\lib\encodings\euc_jis_2004.py to encodings\euc_jis_20
04.pyc
byte-compiling C:\Python26\lib\encodings\euc_jisx0213.py to encodings\euc_jisx02
13.pyc
byte-compiling C:\Python26\lib\encodings\euc_jp.py to encodings\euc_jp.pyc
byte-compiling C:\Python26\lib\encodings\euc_kr.py to encodings\euc_kr.pyc
byte-compiling C:\Python26\lib\encodings\gb18030.py to encodings\gb18030.pyc
byte-compiling C:\Python26\lib\encodings\gb2312.py to encodings\gb2312.pyc
byte-compiling C:\Python26\lib\encodings\gbk.py to encodings\gbk.pyc
byte-compiling C:\Python26\lib\encodings\hex_codec.py to encodings\hex_codec.pyc

byte-compiling C:\Python26\lib\encodings\hp_roman8.py to encodings\hp_roman8.pyc

byte-compiling C:\Python26\lib\encodings\hz.py to encodings\hz.pyc
byte-compiling C:\Python26\lib\encodings\idna.py to encodings\idna.pyc
byte-compiling C:\Python26\lib\encodings\iso2022_jp.py to encodings\iso2022_jp.p
yc
byte-compiling C:\Python26\lib\encodings\iso2022_jp_1.py to encodings\iso2022_jp
_1.pyc
byte-compiling C:\Python26\lib\encodings\iso2022_jp_2.py to encodings\iso2022_jp
_2.pyc
byte-compiling C:\Python26\lib\encodings\iso2022_jp_2004.py to encodings\iso2022
_jp_2004.pyc
byte-compiling C:\Python26\lib\encodings\iso2022_jp_3.py to encodings\iso2022_jp
_3.pyc
byte-compiling C:\Python26\lib\encodings\iso2022_jp_ext.py to encodings\iso2022_
jp_ext.pyc
byte-compiling C:\Python26\lib\encodings\iso2022_kr.py to encodings\iso2022_kr.p
yc
byte-compiling C:\Python26\lib\encodings\iso8859_1.py to encodings\iso8859_1.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_10.py to encodings\iso8859_10.p
yc
byte-compiling C:\Python26\lib\encodings\iso8859_11.py to encodings\iso8859_11.p
yc
byte-compiling C:\Python26\lib\encodings\iso8859_13.py to encodings\iso8859_13.p
yc
byte-compiling C:\Python26\lib\encodings\iso8859_14.py to encodings\iso8859_14.p
yc
byte-compiling C:\Python26\lib\encodings\iso8859_15.py to encodings\iso8859_15.p
yc
byte-compiling C:\Python26\lib\encodings\iso8859_16.py to encodings\iso8859_16.p
yc
byte-compiling C:\Python26\lib\encodings\iso8859_2.py to encodings\iso8859_2.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_3.py to encodings\iso8859_3.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_4.py to encodings\iso8859_4.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_5.py to encodings\iso8859_5.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_6.py to encodings\iso8859_6.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_7.py to encodings\iso8859_7.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_8.py to encodings\iso8859_8.pyc

byte-compiling C:\Python26\lib\encodings\iso8859_9.py to encodings\iso8859_9.pyc

byte-compiling C:\Python26\lib\encodings\johab.py to encodings\johab.pyc
byte-compiling C:\Python26\lib\encodings\koi8_r.py to encodings\koi8_r.pyc
byte-compiling C:\Python26\lib\encodings\koi8_u.py to encodings\koi8_u.pyc
byte-compiling C:\Python26\lib\encodings\latin_1.py to encodings\latin_1.pyc
byte-compiling C:\Python26\lib\encodings\mac_arabic.py to encodings\mac_arabic.p
yc
byte-compiling C:\Python26\lib\encodings\mac_centeuro.py to encodings\mac_centeu
ro.pyc
byte-compiling C:\Python26\lib\encodings\mac_croatian.py to encodings\mac_croati
an.pyc
byte-compiling C:\Python26\lib\encodings\mac_cyrillic.py to encodings\mac_cyrill
ic.pyc
byte-compiling C:\Python26\lib\encodings\mac_farsi.py to encodings\mac_farsi.pyc

byte-compiling C:\Python26\lib\encodings\mac_greek.py to encodings\mac_greek.pyc

byte-compiling C:\Python26\lib\encodings\mac_iceland.py to encodings\mac_iceland
.pyc
byte-compiling C:\Python26\lib\encodings\mac_latin2.py to encodings\mac_latin2.p
yc
byte-compiling C:\Python26\lib\encodings\mac_roman.py to encodings\mac_roman.pyc

byte-compiling C:\Python26\lib\encodings\mac_romanian.py to encodings\mac_romani
an.pyc
byte-compiling C:\Python26\lib\encodings\mac_turkish.py to encodings\mac_turkish
.pyc
byte-compiling C:\Python26\lib\encodings\mbcs.py to encodings\mbcs.pyc
byte-compiling C:\Python26\lib\encodings\palmos.py to encodings\palmos.pyc
byte-compiling C:\Python26\lib\encodings\ptcp154.py to encodings\ptcp154.pyc
byte-compiling C:\Python26\lib\encodings\punycode.py to encodings\punycode.pyc
byte-compiling C:\Python26\lib\encodings\quopri_codec.py to encodings\quopri_cod
ec.pyc
byte-compiling C:\Python26\lib\encodings\raw_unicode_escape.py to encodings\raw_
unicode_escape.pyc
byte-compiling C:\Python26\lib\encodings\rot_13.py to encodings\rot_13.pyc
byte-compiling C:\Python26\lib\encodings\shift_jis.py to encodings\shift_jis.pyc

byte-compiling C:\Python26\lib\encodings\shift_jis_2004.py to encodings\shift_ji
s_2004.pyc
byte-compiling C:\Python26\lib\encodings\shift_jisx0213.py to encodings\shift_ji
sx0213.pyc
byte-compiling C:\Python26\lib\encodings\string_escape.py to encodings\string_es
cape.pyc
byte-compiling C:\Python26\lib\encodings\tis_620.py to encodings\tis_620.pyc
byte-compiling C:\Python26\lib\encodings\undefined.py to encodings\undefined.pyc

byte-compiling C:\Python26\lib\encodings\unicode_escape.py to encodings\unicode_
escape.pyc
byte-compiling C:\Python26\lib\encodings\unicode_internal.py to encodings\unicod
e_internal.pyc
byte-compiling C:\Python26\lib\encodings\utf_16.py to encodings\utf_16.pyc
byte-compiling C:\Python26\lib\encodings\utf_16_be.py to encodings\utf_16_be.pyc

byte-compiling C:\Python26\lib\encodings\utf_16_le.py to encodings\utf_16_le.pyc

byte-compiling C:\Python26\lib\encodings\utf_32.py to encodings\utf_32.pyc
byte-compiling C:\Python26\lib\encodings\utf_32_be.py to encodings\utf_32_be.pyc

byte-compiling C:\Python26\lib\encodings\utf_32_le.py to encodings\utf_32_le.pyc

byte-compiling C:\Python26\lib\encodings\utf_7.py to encodings\utf_7.pyc
byte-compiling C:\Python26\lib\encodings\utf_8.py to encodings\utf_8.pyc
byte-compiling C:\Python26\lib\encodings\utf_8_sig.py to encodings\utf_8_sig.pyc

byte-compiling C:\Python26\lib\encodings\uu_codec.py to encodings\uu_codec.pyc
byte-compiling C:\Python26\lib\encodings\zlib_codec.py to encodings\zlib_codec.p
yc
byte-compiling C:\Python26\lib\functools.py to functools.pyc
byte-compiling C:\Python26\lib\genericpath.py to genericpath.pyc
byte-compiling C:\Python26\lib\getopt.py to getopt.pyc
byte-compiling C:\Python26\lib\gettext.py to gettext.pyc
byte-compiling C:\Python26\lib\heapq.py to heapq.pyc
byte-compiling C:\Python26\lib\inspect.py to inspect.pyc
byte-compiling C:\Python26\lib\keyword.py to keyword.pyc
byte-compiling C:\Python26\lib\linecache.py to linecache.pyc
byte-compiling C:\Python26\lib\locale.py to locale.pyc
byte-compiling C:\Python26\lib\ntpath.py to ntpath.pyc
byte-compiling C:\Python26\lib\numbers.py to numbers.pyc
byte-compiling C:\Python26\lib\opcode.py to opcode.pyc
byte-compiling C:\Python26\lib\optparse.py to optparse.pyc
byte-compiling C:\Python26\lib\os.py to os.pyc
byte-compiling C:\Python26\lib\os2emxpath.py to os2emxpath.pyc
byte-compiling C:\Python26\lib\pdb.py to pdb.pyc
byte-compiling C:\Python26\lib\pickle.py to pickle.pyc
byte-compiling C:\Python26\lib\posixpath.py to posixpath.pyc
byte-compiling C:\Python26\lib\pprint.py to pprint.pyc
byte-compiling C:\Python26\lib\quopri.py to quopri.pyc
byte-compiling C:\Python26\lib\random.py to random.pyc
byte-compiling C:\Python26\lib\re.py to re.pyc
byte-compiling C:\Python26\lib\repr.py to repr.pyc
byte-compiling C:\Python26\lib\shlex.py to shlex.pyc
byte-compiling C:\Python26\lib\site-packages\zipextimporter.py to zipextimporter
.pyc
byte-compiling C:\Python26\lib\sre.py to sre.pyc
byte-compiling C:\Python26\lib\sre_compile.py to sre_compile.pyc
byte-compiling C:\Python26\lib\sre_constants.py to sre_constants.pyc
byte-compiling C:\Python26\lib\sre_parse.py to sre_parse.pyc
byte-compiling C:\Python26\lib\stat.py to stat.pyc
byte-compiling C:\Python26\lib\string.py to string.pyc
byte-compiling C:\Python26\lib\stringprep.py to stringprep.pyc
byte-compiling C:\Python26\lib\struct.py to struct.pyc
byte-compiling C:\Python26\lib\subprocess.py to subprocess.pyc
byte-compiling C:\Python26\lib\tempfile.py to tempfile.pyc
byte-compiling C:\Python26\lib\textwrap.py to textwrap.pyc
byte-compiling C:\Python26\lib\threading.py to threading.pyc
byte-compiling C:\Python26\lib\token.py to token.pyc
byte-compiling C:\Python26\lib\tokenize.py to tokenize.pyc
byte-compiling C:\Python26\lib\traceback.py to traceback.pyc
byte-compiling C:\Python26\lib\types.py to types.pyc
byte-compiling C:\Python26\lib\unittest.py to unittest.pyc
byte-compiling C:\Python26\lib\warnings.py to warnings.pyc
*** copy extensions ***
copying C:\Python26\DLLs\bz2.pyd -> C:\Python26\working\build\bdist.win32\winexe
\collect-2.6
copying C:\Python26\DLLs\select.pyd -> C:\Python26\working\build\bdist.win32\win
exe\collect-2.6
copying C:\Python26\DLLs\unicodedata.pyd -> C:\Python26\working\build\bdist.win3
2\winexe\collect-2.6
copying C:\Python26\lib\site-packages\cx_Oracle.pyd -> C:\Python26\working\build
\bdist.win32\winexe\collect-2.6
*** copy dlls ***
copying C:\Oracle\XEClient\bin\OCI.dll -> C:\Python26\working\build\bdist.win32\
winexe\collect-2.6
copying C:\Python26\lib\site-packages\py2exe\run.exe -> C:\Python26\working\dist
\testora.exe

*** binary dependencies ***
Your executable(s) also depend on these dlls which are not included,you may or may not need to distribute them.

Make sure you have the license if you distribute any of them,and
make sure you don't distribute files belonging to the operating system.

   USER32.dll - C:\WINDOWS\system32\USER32.dll
   SHELL32.dll - C:\WINDOWS\system32\SHELL32.dll
   WSOCK32.dll - C:\WINDOWS\system32\WSOCK32.dll
   ADVAPI32.dll - C:\WINDOWS\system32\ADVAPI32.dll
   msvcrt.dll - C:\WINDOWS\system32\msvcrt.dll
   KERNEL32.dll - C:\WINDOWS\system32\KERNEL32.dll

C:\Python26\working\dist>testora
Traceback (most recent call last):
  File "testora.py",line 19,in <module>
  File "testora.py",line 11,in testora
cx_Oracle.InterfaceError: Unable to acquire Oracle environment handle

解决方法

您是否确保在使用py2exe构建时排除OCI.dll?如果您机器上的DLL版本与另一台机器上的客户端版本不兼容,那么您测试它(我注意到您在机器上尝试了11g客户端但是10g),那么此配置将无法工作(我忘记了实际的错误消息)虽然).

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


我最近重新拾起了计算机视觉,借助Python的opencv还有face_recognition库写了个简单的图像识别demo,额外定制了一些内容,原本想打包成exe然后发给朋友,不过在这当中遇到了许多小问题,都解决了,记录一下踩过的坑。 1、Pyinstaller打包过程当中出现warning,跟d
说到Pooling,相信学习过CNN的朋友们都不会感到陌生。Pooling在中文当中的意思是“池化”,在神经网络当中非常常见,通常用的比较多的一种是Max Pooling,具体操作如下图: 结合图像理解,相信你也会大概明白其中的本意。不过Pooling并不是只可以选取2x2的窗口大小,即便是3x3,
记得大一学Python的时候,有一个题目是判断一个数是否是复数。当时觉得比较复杂不好写,就琢磨了一个偷懒的好办法,用异常处理的手段便可以大大程度帮助你简短代码(偷懒)。以下是判断整数和复数的两段小代码: 相信看到这里,你也有所顿悟,能拓展出更多有意思的方法~
文章目录 3 直方图Histogramplot1. 基本直方图的绘制 Basic histogram2. 数据分布与密度信息显示 Control rug and density on seaborn histogram3. 带箱形图的直方图 Histogram with a boxplot on t
文章目录 5 小提琴图Violinplot1. 基础小提琴图绘制 Basic violinplot2. 小提琴图样式自定义 Custom seaborn violinplot3. 小提琴图颜色自定义 Control color of seaborn violinplot4. 分组小提琴图 Group
文章目录 4 核密度图Densityplot1. 基础核密度图绘制 Basic density plot2. 核密度图的区间控制 Control bandwidth of density plot3. 多个变量的核密度图绘制 Density plot of several variables4. 边
首先 import tensorflow as tf tf.argmax(tenso,n)函数会返回tensor中参数指定的维度中的最大值的索引或者向量。当tensor为矩阵返回向量,tensor为向量返回索引号。其中n表示具体参数的维度。 以实际例子为说明: import tensorflow a
seaborn学习笔记章节 seaborn是一个基于matplotlib的Python数据可视化库。seaborn是matplotlib的高级封装,可以绘制有吸引力且信息丰富的统计图形。相对于matplotlib,seaborn语法更简洁,两者关系类似于numpy和pandas之间的关系,seabo
Python ConfigParser教程显示了如何使用ConfigParser在Python中使用配置文件。 文章目录 1 介绍1.1 Python ConfigParser读取文件1.2 Python ConfigParser中的节1.3 Python ConfigParser从字符串中读取数据
1. 处理Excel 电子表格笔记(第12章)(代码下载) 本文主要介绍openpyxl 的2.5.12版处理excel电子表格,原书是2.1.4 版,OpenPyXL 团队会经常发布新版本。不过不用担心,新版本应该在相当长的时间内向后兼容。如果你有新版本,想看看它提供了什么新功能,可以查看Open
1. 发送电子邮件和短信笔记(第16章)(代码下载) 1.1 发送电子邮件 简单邮件传输协议(SMTP)是用于发送电子邮件的协议。SMTP 规定电子邮件应该如何格式化、加密、在邮件服务器之间传递,以及在你点击发送后,计算机要处理的所有其他细节。。但是,你并不需要知道这些技术细节,因为Python 的
文章目录 12 绘图实例(4) Drawing example(4)1. Scatterplot with varying point sizes and hues(relplot)2. Scatterplot with categorical variables(swarmplot)3. Scat
文章目录 10 绘图实例(2) Drawing example(2)1. Grouped violinplots with split violins(violinplot)2. Annotated heatmaps(heatmap)3. Hexbin plot with marginal dist
文章目录 9 绘图实例(1) Drawing example(1)1. Anscombe’s quartet(lmplot)2. Color palette choices(barplot)3. Different cubehelix palettes(kdeplot)4. Distribution
Python装饰器教程展示了如何在Python中使用装饰器基本功能。 文章目录 1 使用教程1.1 Python装饰器简单示例1.2 带@符号的Python装饰器1.3 用参数修饰函数1.4 Python装饰器修改数据1.5 Python多层装饰器1.6 Python装饰器计时示例 2 参考 1 使
1. 用GUI 自动化控制键盘和鼠标第18章 (代码下载) pyautogui模块可以向Windows、OS X 和Linux 发送虚拟按键和鼠标点击。根据使用的操作系统,在安装pyautogui之前,可能需要安装一些其他模块。 Windows: 不需要安装其他模块。OS X: sudo pip3
文章目录 生成文件目录结构多图合并找出文件夹中相似图像 生成文件目录结构 生成文件夹或文件的目录结构,并保存结果。可选是否滤除目录,特定文件以及可以设定最大查找文件结构深度。效果如下: root:[z:/] |--a.py |--image | |--cat1.jpg | |--cat2.jpg |
文章目录 VENN DIAGRAM(维恩图)1. 具有2个分组的基本的维恩图 Venn diagram with 2 groups2. 具有3个组的基本维恩图 Venn diagram with 3 groups3. 自定义维恩图 Custom Venn diagram4. 精致的维恩图 Elabo
mxnet60分钟入门Gluon教程代码下载,适合做过深度学习的人使用。入门教程地址: https://beta.mxnet.io/guide/getting-started/crash-course/index.html mxnet安装方法:pip install mxnet 1 在mxnet中使
文章目录 1 安装2 快速入门2.1 基本用法2.2 输出图像格式2.3 图像style设置2.4 属性2.5 子图和聚类 3 实例4 如何进一步使用python graphviz Graphviz是一款能够自动排版的流程图绘图软件。python graphviz则是graphviz的python实