草庐IT

relative-import

全部标签

python 安装工具: ImportError: cannot import name Library

我有一台Windows764位机器,想安装python包mgrs。我尝试在mgrs目录中同时使用easy_install和运行pythonsetup.pyinstall。Easy_install给我以下错误。C:\Users\farrell>easy_installmgrsSearchingformgrsReadinghttps://pypi.python.org/simple/mgrs/Bestmatch:mgrs1.1.0Downloadinghttps://pypi.python.org/packages/source/m/mgrs/mgrs-1.1.0.tar.gz#md5=9

windows - Ant 中的 "No suitable relative path"(操作系统 : windows)

当我在build.xml中使用“manifestclasspath”时,我在Ant中面临上述问题。我在Windows中遇到的问题是;Nosuitablerelativepath.................C:\Users\TOSH\Desktop\sampleserver\repository\components\plugins\XmlSchema_1.4.7.wso2v2.jar我的build.xml如下;有人知道原因吗? 最佳答案 我在教程中的SimpleStockQuote示例中也发现了这一点。如果您修改build.x

windows - 可嵌入的 Common-Lisp asdf :defsystem returning invalid relative pathname

我正在尝试学习如何使用Common-Lisp的asdf,我有以下代码:(asdf:defsystemexample:serialt:components((:file"first")(:file"second")))但是,我一直收到错误:Conditionoftype:SIMPLE-ERRORInvalidrelativepathname#P"first.lisp"forcomponent("example""first")我在与这两个Lisp文件相同的目录中启动repl,但我不明白为什么会出现错误。我错过了什么?我在Windows上使用ECL 最佳答案

python - import theano (0.6) on Windows 8 with device= gpu (and visual studios 12.0)

当我尝试将Theano与GPU设备一起使用时,我遇到了编译问题(它在CPU上运行良好)。我遇到的问题与已报告的问题几乎完全相同here,但是遵循提供的解决方案对我不起作用。按照原来的解决方案,我可以验证pycuda是否已经安装成功,但是导入theano仍然会抛出同样的错误:c:\python\python27\include\pymath.h(22):warning:dllexport/dllimportconflictwith"round"c:\programfiles\nvidiagpucomputingtoolkit\cuda\v6.5\include\math_function

python - Pyinstaller导入错误: cannot import name 'dist' on Windows

我正在尝试使用Pyinstaller(3.3版)在Windows(8.1版)上将Python(3.6版)项目构建到单个exe文件中。该项目包括PyQt5、numpy、matplotlib依赖项。Pyinstaller写道:BuildingEXEfromout00-exe.toccompletedsuccessfully.但是当我运行exe文件时,我得到:...File"distutils\__init__.py",line44,inImportError:cannotimportname'dist'[6748]Failedtoexecutescriptmyproj第44行的文件"dis

Python 在我的脚本中失败到 `import nltk` 但在解释器中工作

我想通了原因,我把原来的脚本文件命名为nltk.py,于是python尝试从脚本文件orz中导入word_tokenize。很抱歉犯了这个愚蠢的错误。我正在尝试在Windows上的Python中使用nltk。我已经安装了nltk和nltk数据。但是,当我尝试运行时python-u'filename.py'在命令行中,它给出如下错误。Traceback(mostrecentcalllast):File"filename.py",line1,in(module)fromnltkimportword_tokenizeFile"filenmae.py",line1,in(module)from

c++ - 视觉 C++ : Linking a DLL from another DLL using a relative path

我有以下文件结构C:\Application\application.exeC:\Application\plugins\myplugin\myplugin.dllC:\Application\plugins\myplugin\libs\utils.dll此处application.exe通过LoadLibrary动态加载myplugin.dll。请注意,我无法控制application.exe,因为我只是在开发插件。我想要的是通过相对路径让myplugin.dll加载libs\utils.dll(理想情况下使用静态链接)。也就是说,我不想依赖于application.exe的位置。我

windows - PE : Relation between SizeOfRawData and VirtualSize fields of the section header

我看到对于图像文件中的部分,VirtualSize字段是加载到内存中时部分的总大小,而SizeOfRawData字段是部分的大小磁盘上的初始化数据。在检查.idata部分时,VirtualSize字段设置为0x14,而SizeOfRawData字段设置为0x400。为什么链接器-在本例中为MinGWld-使文件部分如此之大,而加载到内存中的部分只是其大小的一小部分?此外,VirtualSize字段的用途是什么?为什么不总是加载整个部分,即加载SizeOfRawData字节?我在官方PE文档中没有看到描述或它们之间的关系。 最佳答案

c# - "Predefined type ' System.* ' is not defined or imported"错误,visual studio 代码,omnisharp

我在几个.net核心应用程序中遇到上述错误的问题。我正在使用vscode版本1.18.0,但错误已经开始出现在以前的版本中。错误出现在每个.cs文件中的每种数据类型(如字符串、整数、void等)以及类导入。所有项目仍然可以正常编译和运行。同样在另一个工作站上,我没有在同一个项目中遇到问题,所以它似乎是本地omnisharp/vscode或windows?问题。有没有人遇到过类似的问题并设法修复它或对我可以尝试的方法有任何建议?我已经重新安装了vscode和omnisharp,但我仍然遇到问题。示例错误:未定义或导入预定义类型“System.Object”[GG]

c# - SharePoint 错误 : "Cannot import Web Part"

我有一个自己开发的Web部件,如果我手动安装该Web部件就没问题。但是,当我按照本网站上的说明打包Web部件时:http://www.theartofsharepoint.com/2007/05/how-to-build-solution-pack-wsp.html我在日志文件中收到此错误:09/23/200814:13:03.67w3wp.exe(0x1B5C)0x1534WindowsSharePointServicesWebParts8l4dMonitorableErrorimportingWebPart.CannotimportProjectFilter.09/23/20081