SQLite 库 - Python 可移植性

发布于 2024-12-19 17:06:44 字数 223 浏览 0 评论 0原文

我正在编写一些代码,旨在与程序中包含的预捆绑版本的 Python 一起运行。 问题是它尚未包含 Sqlite3 库,这是我的代码的要求。目前我有一个包装,它调用系统安装的 python2.7 版本来使用导入。

有什么方法可以手动包含或打包这个库以与代码一起使用以使其更加可移植吗?我担心的是,我需要它在 Windows 系统上运行,但他们不太可能提供 python2.7。 (2.7 是最小值,因为这包括对库的更新)

I am writing some code that is intended to operate with a pre-bundled version of Python included with a program.
The issue is that it doesn't as yet include the Sqlite3 library which is a requirement of my code. Currently I have a wrapped that calls a system installed version of python2.7 to use the import.

Is there any way I can manually include or package this library to go with the code to make it more portable? My concern is that I require this to operate on Windows systems but it is less likely that they will have python2.7 available. (2.7 is the minimum as this included an update to the library)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

别挽留 2024-12-26 17:06:44

是的,在 python 中你有设置工具。您可以使用requirements.txt文件并使用pip install -rrequirements.txt来安装依赖项。

pip 链接

Yes in python you have setup tools. You can use requirements.txt file and use pip install -r requirements.txt to install dependency.

pip link

浮华 2024-12-26 17:06:44

pysqlite 也作为外部项目进行维护,看起来他们有 下载一直回到 Python 2.3

pysqlite is also maintained as an external project, looks like they've got downloads all the way back to Python 2.3

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文