草庐IT

module_has_competence

全部标签

python - gevent 库 : "Import Error: no module named greenlet"

大家好,我下载了一个需要geventpython库的脚本,每次运行该脚本时,它都会显示:File"shodan.py",line7,infromgeventimportmonkeyFile"C:\Python27\lib\site-packages\gevent\__init__.py",line48,infromgevent.greenletimportGreenlet,joinall,killallFile"C:\Python27\lib\site-packages\gevent\greenlet.py",line6,infromgevent.hubimportgreenlet,g

python - Py 安装程序 "ImportError: No module named Pyinstaller"

这是我运行pythonconfigure.py时生成的代码。dan@Q430-Q530:~/pyinstaller-2.0/PyInstaller$pythonconfigure.pyTraceback(mostrecentcalllast):File"configure.py",line28,infromPyInstallerimportHOMEPATH,PLATFORMImportError:NomodulenamedPyInstaller因此,目前,由于缺少一个名为...PyInstaller的模块,我什至无法运行PyInstaller。这是PyInstaller2.0,您可以找

Python 导入优先级 : packages or modules?

我不清楚如何正确命名这个问题。案例一假设我有以下目录结构。foo|+-bar/__init__.py|+-bar.py如果我有fromfooimportbar我如何知道正在导入哪个柱(bar.py或bar/__init__.py)?有什么简单的方法可以自动检测这种情况的发生吗?案例二foo|+-foo.py|+-other.py如果other.py有这行importfoo我如何知道正在导入哪个foo(foo或foo.foo)?同样,是否有任何简单的方法可以自动检测这种情况的发生? 最佳答案 TLDR;如果包在同一目录中,则包优先于同

python - 导入错误 : No module named enum on python 2. 7

我正在使用Python2.7运行代码。我得到“ImportError:没有名为enum的模块”。我用“pipinstallenum”安装了枚举,但错误不断出现。我该怎么办?? 最佳答案 你想要backport:pipinstallenum34不幸的是,PyPI上名为enum的发行版是另外一回事。 关于python-导入错误:Nomodulenamedenumonpython2.7,我们在StackOverflow上找到一个类似的问题: https://stac

python - zc.buildout 停止工作 : ImportError: No module named apport. fileutils

我已经使用buildout很长一段时间了,没有任何问题,事实上我昨天没有遇到任何问题。但就像今天一样,我所有的项目都未能扩建。我在两个不同的Ubuntu工作站上尝试了相同的结果。这是我得到的错误:Initializingzc.buildoutDebug:Downloadinghttp://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.eggTraceback(mostrecentcalllast):File"bootstrap.py",line259,inimportzc.buildout.build

python - 导入错误 : No module named pxssh

我正在尝试使用pxssh模块与客户端建立SSH连接-但是我得到:ImportError:Nomodulenamedpxssh我在Python安装中找到了这个文件,所以我猜是正确的:/usr/lib/python2.7/site-packages/pexpect/pxssh.py当然,我正在使用Python2.7运行我的应用程序,我什至尝试导入pexpect,但这没有帮助。 最佳答案 好吧,试试frompexpectimportpxssh。更新:该解决方案仅适用于Linux,因为Windows不支持pxssh

主要报错:10% building 2/2 modules 0 activeError: error:0308010C:digital envelope rout

项目场景:主要报错:10%building2/2modules0activeError:error:0308010C:digitalenveloperout报错内容:PSC:\Users\815\Desktop\新建文件夹(2)\login>npmrunserveDebuggerattached.>snow@0.1.0serve>vue-cli-serviceserveDebuggerattached.INFOStartingdevelopmentserver...10%building0/1modules1active...ckPath=/sockjs-nodeC:\Users\815\De

python 2.7 : log displayed twice when `logging` module is used in two python scripts

上下文:Python2.7。同一文件夹中的两个文件:首先:主脚本。第二:自定义模块。目标:可以在没有任何冲突的情况下使用logging模块(见下面的输出)。文件:a.py:importloggingfrombimporttest_bdeftest_a(logger):logger.debug("debug")logger.info("info")logger.warning("warning")logger.error("error")if__name__=="__main__":#Customlogger.logger=logging.getLogger("test")formatt

python - Keras 自定义损失实现 : ValueError: An operation has `None` for gradient

我正在尝试实现这个损失函数:MCFD_loss_function来自本文档(P6):Lossfunctions所以我创建了一个这样的新函数:defmcfd_loss(y_true,y_pred):returnK.sum(#∑K.cast(K.greater(#onlyvaluesgreaterthan0(+float32cast)K.dot(K.sign(y_pred),#πK.sign(y_true)),0),'float32'))但是当我开始训练时出现了这个错误:ValueError:AnoperationhasNoneforgradient.Pleasemakesurethata

处理 Runtime Error: one of the variables needed for gradient computation has been

两次遇到这个问题,记录一下1、反向传播时报错,参考 在用pytorch跑生成对抗网络的时候,出现错误RuntimeError:oneofthevariablesneededforgradientcomputationhasbeen_qq_33093927的博客-CSDN博客最近在看GAN,遇到了些问题,发现是前人踩过的坑,确实帮到了我,集中整理下吧目录问题环境配置解决过程总结问题在用pytorch跑生成对抗网络的时候,出现错误RuntimeError:oneofthevariablesneededforgradientcomputationhasbeenmodifiedbyaninplaceo