json Python包版本查找器

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json Python包版本查找器相关的知识,希望对你有一定的参考价值。

	"Package version": {
		"prefix": "package-version",
		"body": [
		  "import pkg_resources",
		  "import setuptools_scm",
		  "",
		  "try:",
		  "\t# Try to get version number from repository",
		  "\tVERSION = setuptools_scm.get_version()",
		  "except LookupError:",
		  "\t# Not in repo, so try to get version number from pkg_resources",
		  "\ttry:",
		  "\t\tVERSION = pkg_resources.get_distribution(\"${1:package-name}\").version",
		  "\texcept pkg_resources.DistributionNotFound:",
		  "\t\t# Not installed?",
		  "\t\tVERSION = \"Unknown\"",
		  ""
		],
		"description": "Snippet for getting a package's version using setuptools_scm and pkg_resources."
	  }

以上是关于json Python包版本查找器的主要内容,如果未能解决你的问题,请参考以下文章

python的版本包库包管理器虚拟环境开发工具等概念

python-知识点的复习

如何查找python安装包的路径site-packages?

轻松学Kubernetes 的包管理器-Helm

npm(Node包管理器)命令行选项

NPM(Node Package Manager,Node包管理器)