草庐IT

COMPONENT_REQUIRES

全部标签

node.js - 了解 Node.js 模块 : multiple requires return the same object?

我有一个与thenode.jsdocumentationonmodulecaching相关的问题:Modulesarecachedafterthefirsttimetheyareloaded.Thismeans(amongotherthings)thateverycalltorequire('foo')willgetexactlythesameobjectreturned,ifitwouldresolvetothesamefile.Multiplecallstorequire('foo')maynotcausethemodulecodetobeexecutedmultipletimes

python - MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe"

我想安装nodejs很久了。我尝试通过谷歌搜索,但严重的是我没有任何有效的解决方案。我的第一个问题是为什么Nodejs需要MicrosoftVisual组件?其次,根据谷歌的建议,我尝试了以下事情安装了VisualC++2010(更新了变量中的路径)但之后安装我遇到了更多错误,包括“MSBUILD:错误MSB3428:无法加载VisualC++组件“VCBuild.exe”。通过https://github.com/TooTallNate/node-gyp删除错误,但仍然无法正常工作。再次卸载并安装Nodejs,但没有成功。我有以下版本Nodejs0.12Python2.7Ruby1.

python - 无效请求错误 : VARCHAR requires a length on dialect mysql

我正在尝试在运行12.04的Ubuntu机器上使用mysql创建一个远程数据库。它有一个启用远程登录且没有密码的root用户。我已经启动了服务器。输出sudonetstat-tap|grepmysql显示tcp00localhost:mysql*:*LISTEN13246/mysqld我使用创建了一个名为nwtopology的数据库(如上所述,root还没有密码。)createdatabasenwtopologygrantallprivilegeson*.*toroot@192.168.129.221FLUSHPRIVILEGES;在同样运行Ubuntu12.04的客户端机器上,我使用

覆盖 cmdclass 时忽略 python setuptools install_requires

我有一个如下所示的setup.py:fromsetuptoolsimportsetupfromsubprocessimportcallfromsetuptools.command.installimportinstallclassMyInstall(install):defrun(self):call(["pipinstall-rrequirements.txt--no-clean"],shell=True)install.run(self)setup(author='AttilaZseder',version='0.1',name='entity_extractor',package

python - 类型错误 : Format Requires Mapping

我有一个字符串和一个对象列表:gpl="%(id)s:%(atr)s"objects=[{'id':1,'content':[{'atr':'big','no':2}]},{'id':2,'content':[{'atr':'small','no':3}]}]forobjinobjects:forconinobj['content']:printgpl%(obj,con)我明白了:TypeError:formatrequiresamapping我将如何打印这个?我正在尝试打印:1:big2:small谢谢 最佳答案 由于您的格式化字

python - 安装 Python : "Ignoring ensurepip failure: pip 8.1.1 requires SSL/TLS" 时出现 pip 错误

我下载了Python3.5源代码并运行了以下代码:$tar-xfPython-3.5.2.tar.xz$./configure--with-ensurepip=upgrade$make$sudomakealtinstall在make之前进展顺利。当sudomakealtinstall运行时,它会打印:忽略ensurepip失败:pip8.1.1需要SSL/TLS出了什么问题? 最佳答案 您很可能没有在编译Python时支持SSL/TLS-这可能是因为您的系统上没有安装SSL开发依赖项。安装以下依赖,然后重新配置重新编译Python3

python - pip 是否处理来自 setuptools/distribute 来源的 extras_requires?

我有一个带有setup.py和extras_requires的包“A”行如:extras_require={'ssh':['paramiko'],},还有一个依赖于util的包“B”:install_requires=['A[ssh]']如果我在包B上运行pythonsetup.pyinstall,它在后台使用setuptools.command.easy_install,则extras_requires是正确解析,并且安装了paramiko。但是,如果我运行pip/path/to/B或piphxxp://.../b-version.tar.gz,包A是已安装,但paramiko未安装

python - 如何在 install_requires 中指定版本范围(setuptools、distribute)

我想制作一个依赖于特定版本范围的包,例如>=0.5.0,.install_requires有可能吗?选项,如果是的话应该怎么做? 最佳答案 根据thedocumentation,您的语法应该可以正常工作。该文档指出:setuptoolsandpkg_resourcesuseacommonsyntaxforspecifyingaproject'srequireddependencies.Thissyntaxconsistsofaproject'sPyPIname,optionallyfollowedbyacomma-separated

python - 通过 pip : this package requires Python 3. 3 或更高版本为 python 2.7 安装 py2exe

>>>python-c"importsys;printsys.version"2.7.6(default,Nov102013,19:24:18)[MSCv.150032bit(Intel)]>>>pip--versionpip1.5.5fromC:\Python27\lib\site-packages(python2.7)>>>pipinstallpy2exeRuntimeError:ThispackagerequiresPython3.3orlater虽然是官方的py2exedownloadpage说他们有我需要的东西:那么如何通过pip安装py2exe?

Python 安装工具 : How can I list a private repository under install_requires?

我正在创建一个setup.py依赖于私有(private)GitHub存储库的项目的文件。文件的相关部分如下所示:fromsetuptoolsimportsetupsetup(name='my_project',...,install_requires=['public_package','other_public_package','private_repo_1','private_repo_2',],dependency_links=['https://github.com/my_account/private_repo_1/master/tarball/','https://gi