草庐IT

freeze_support

全部标签

python - 如何使用 cx_Freeze 卡住双模式(GUI 和控制台)应用程序?

我开发了一个Python应用程序,它可以在GUI模式和控制台模式下运行。如果指定了任何参数,它将以控制台模式运行,否则以GUI模式运行。我已经设法使用cx_Freeze卡住了它。我在隐藏wxPython弹出的黑色控制台窗口时遇到了一些问题,所以我修改了我的setup.py脚本,如下所示:importsysfromcx_Freezeimportsetup,Executablebase=Noneifsys.platform=="win32":base="Win32GUI"setup(name="simple_PyQt4",version="0.1",description="Samplec

python - pip freeze 不显示所有已安装的包

我正在使用一个virtualenv。我安装了fabric,带有pip。但是pipfreeze没有给出任何提示。包在那里,在我的virtualenv中,但pip对此保持沉默。为什么会这样?有什么调试方法吗? 最佳答案 我自己试过:在“env”目录中创建一个虚拟环境:$virtualenv2.7--distributeenvNewpythonexecutableinenv/bin/pythonInstallingdistribute....done.Installingpip................done.接下来,激活虚拟环境

c++ - 嵌入python报错Import by filename is not supported

我正在尝试将python嵌入到我的应用程序中,但很早就卡住了。我正在将Python嵌入到我的C++应用程序中并使用本教程中的代码:http://docs.python.org/2/extending/embedding.html#pure-embedding我的应用程序完全匹配并且编译成功没有错误。但是在运行应用程序pModule=PyImport_Import(pName);行失败返回0意味着我从PyErr_Print()得到错误输出Failedtoload"C:\Users\workspace\dpllib\pyscript.py"ImportError:Importbyfilen

python - Scipy hstack 结果为 "TypeError: no supported conversion for types: (dtype(' float6 4'), dtype(' O'))"

我正在尝试运行hstack以将一列整数值连接到由TF-IDF创建的列列表(因此我最终可以在分类器中使用所有这些列/特征)。我正在使用pandas阅读专栏,检查任何NA值并将它们转换为数据框中的最大值,如下所示:OtherColumn=p.read_csv('file.csv',delimiter=";",na_values=['?'])[["OtherColumn"]]OtherColumn=OtherColumn.fillna(OtherColumn.max())OtherColumn=OtherColumn.convert_objects(convert_numeric=True)

python - cx_Freeze 帮助 : is there a way to NOT make console open?

我正在尝试将python游戏(使用pygame制作)转换为适用于Windows的exe文件,并且我确实使用了cx_Freeze。没有问题。问题是,当我启动myGame.exe时,它​​会打开正常的Pygame窗口和控制台窗口(我不想要)。有没有办法删除控制台窗口?我阅读了大部分文档,但实际上什么也没看到(除了base,但我不明白那是什么)。顺便说一句,这是我的安装文件:importcx_Freezeexe=[cx_Freeze.Executable("myGame.py")]cx_Freeze.setup(name="GameName",version="1.0",options={"

python - Cx_freeze ImportError 没有名为 scipy 的模块

大家好,我在转换为.exe的代码上使用cx_Freeze时遇到问题。当我运行cx_Freeze时,我得到以下ImportError,指出没有名为scipy的模块runninginstallrunningbuildrunningbuild_exeTraceback(mostrecentcalllast):File"setup.py",line25,inexecutables=executablesFile"C:\Python34\lib\site-packages\cx_Freeze\dist.py",line362,insetupdistutils.core.setup(**attrs

python - cx_freeze 和单文件鸡蛋

我试图在Windows7上使用cx_freeze和python2.7distutils脚本,它似乎被两个包绊倒了:rsa&pyasn1:error:[Error3]Thesystemcannotfindthepathspecified:'c:\\python27\\lib\\site-packages\\pyasn1-0.1.9-py2.7.egg\\pyasn1/*.*'(rsa的错误是类似的。)起初我以为这是一个权限问题(两个egg文件都显示了挂锁徽章),但即使在更改权限后,错误仍然存​​在。然后我注意到这两个蛋不是目录,而是单独的文件,这就可以解释为什么cx_freeze找不到请

python - 使用 pip freeze 忽略某些包及其依赖项

标题基本上说明了一切。我如何告诉pipfreeze忽略某些包,如pylint和pep8及其依赖项? 最佳答案 我的方法如下:我在.bashrc创建以下别名:aliaspipfreezeignore='pipfreeze|grep-vFxfignore_requirements.txt'创建虚拟环境,首先安装所有我不想跟踪的包(即pipinstalljediflake8importmagicautopep8yapf)。立即将它们保存在ignore_requirements.txt文件中,如pipfreeze>ignore_requir

使用git上传代码遇到关于remote: Support for password authentication was removed on August 13, 2021.的问题

问题remote:SupportforpasswordauthenticationwasremovedonAugust13,2021.remote:Pleaseseehttps://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urlsforinformationoncurrentlyrecommendedmodesofauthentication.大体意思就是:2021年8月13日就已经废除了git使用密码登录github的方式如何解决可

python - 使用 cx_Freeze 和 tkinter 时,我得到 : "DLL load failed: The specified module could not be found." (Python 3. 5.3)

当使用cx_Freeze和Tkinter时,我收到消息:File"C:\Users\VergilTheHuragok\AppData\Local\Programs\Python\Python35-32\lib\tkinter\__init__.py",line35,inimport_tkinter#IfthisfailsyourPythonmaynotbeconfiguredforTkImportError:DLLloadfailed:Thespecifiedmodulecouldnotbefound.一些注意事项:我想使用Python3+(目前使用3.5.3,32位)。并不真正关心特