SQLite 库 - Python 可移植性
我正在编写一些代码,旨在与程序中包含的预捆绑版本的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,在 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
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