Closed xtkoba closed 3 years ago
I'm getting the same errors on my Gentoo system despite having dev-db/sqlite-3.35.5
installed. No issue on Arch Linux with sqlite 3.36.0-1
installed.
pacman -Q | rg sqlite
lib32-sqlite 3.36.0-1
sqlite 3.36.0-1
Does someone know which package(s) I need to install on Gentoo? and why is this now required in the first place? I cannot find any mention of it in 2021.07.21
changelog.
@xfzv As for Gentoo, try emerging dev-lang/python
with sqlite
USE flag, say:
# USE=sqlite emerge -1 dev-lang/python
@xfzv As for Gentoo, try emerging
dev-lang/python
withsqlite
USE flag, say:# USE=sqlite emerge -1 dev-lang/python
Thank you! that was it. For some reasons I had dev-lang/python -sqlite
in my package.use
file.
It is needed for the new --cookies-from-browser
option. @mbway anyway to not make it an requirement for people who are not going to use the option?
something like
if ytdlp.options.cookie_from_browser:
*handle imports*
sorry about that. I was under the impression that the sqlite3 module was guaranteed to be present since it's part of the standard library.
It should be easy to work around this. --cookies-from-browser
will require sqlite for loading all cookies except for safari which uses it's own format but I can make it print a warning when you attempt to load cookies when sqlite3 is not available like I did for keyring and pycryptodome.
I can work on a fix this evening.
It is part of the standard library, but it requires Python to be compiled with the native C extension, so it can be compiled without sqlite support.
While this particular issue can be easily fixed, we can't be expected to support anything but the official builds of python.
Does anyone know:
If you build the official Python from python.org without libsqlite-dev it will compile fine but warn that the sqlite3 module is unavailable.
gotcha. Do you know if this affects any other libraries?
this might not be a complete list, but should cover the main list of things that can be toggled:
https://wiki.gentoo.org/wiki/Project:Python/Implementation_USE_flags
The only ones that seem relevant are xml
ssl
and ipv6
. I think it makes sense to support not having sqlite3 since it's not used for anything essential but the others are probably not worth working around.
Checklist
Verbose log
Description
The
_sqlite3
Python module seems to be required since version2021.07.21
.Can we make the program work without that module? It is of course OK that some functions are disabled in that situation.