creator of calibre
Posts: 45,452
Karma: 27757438
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Quote:
Originally Posted by fake-name
The three files are in the source tree at `bypy/windows/site.py`, `bypy/linux/site.py`, `bypy/macos/site.py` Since they're in the bypy sources, I have been assuming they're not part of calibre, but instead part of bypy that then get bundled into calibre as a dependency.
|
They are not in the bypy sources, they are in the calibre sources in a folder named bypy.
Quote:
durr@calibvm ~> calibre-debug -m ensurepip
Inspecting: ensurepip
Traceback (most recent call last):
File "runpy.py", line 194, in _run_module_as_main
File "runpy.py", line 87, in _run_code
File "site.py", line 45, in <module>
File "site.py", line 41, in main
File "calibre/debug.py", line 285, in main
File "calibre/debug.py", line 249, in inspect_mobi
File "calibre/ebooks/mobi/debug/main.py", line 18, in inspect_mobi
FileNotFoundError: [Errno 2] No such file or directory: 'ensurepip'
durr@calibvm ~ [1]> wget https://bootstrap.pypa.io/get-pip.py
--2021-10-16 03:50:54-- https://bootstrap.pypa.io/get-pip.py
Resolving bootstrap.pypa.io (bootstrap.pypa.io)... 2a04:4e42:600::175, 2a04:4e42:400::175, 2a04:4e42:200::175, ...
Connecting to bootstrap.pypa.io (bootstrap.pypa.io)|2a04:4e42:600::175|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2158605 (2.1M) [text/x-python]
Saving to: ‘get-pip.py’
get-pip.py 100%[================================================== ================================================== ======================>] 2.06M 11.9MB/s in 0.2s
2021-10-16 03:50:54 (11.9 MB/s) - ‘get-pip.py’ saved [2158605/2158605]
durr@calibvm ~> calibre-debug get-pip.py
Traceback (most recent call last):
File "runpy.py", line 194, in _run_module_as_main
File "runpy.py", line 87, in _run_code
File "site.py", line 45, in <module>
File "site.py", line 41, in main
File "calibre/debug.py", line 336, in main
File "calibre/debug.py", line 243, in run_script
File "polyglot/builtins.py", line 110, in exec_path
File "/home/durr/get-pip.py", line 27071, in <module>
main()
File "/home/durr/get-pip.py", line 139, in main
bootstrap(tmpdir=tmpdir)
File "/home/durr/get-pip.py", line 115, in bootstrap
monkeypatch_for_cert(tmpdir)
File "/home/durr/get-pip.py", line 96, in monkeypatch_for_cert
from pip._internal.commands.install import InstallCommand
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/commands/__init__.py", line 9, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/cli/base_command.py", line 13, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/cli/cmdoptions.py", line 23, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/cli/parser.py", line 12, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/configuration.py", line 26, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/utils/logging.py", line 13, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/utils/misc.py", line 40, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/locations/__init__.py", line 14, in <module>
File "zipimport.py", line 259, in load_module
File "/tmp/tmpab00a5it/pip.zip/pip/_internal/locations/_distutils.py", line 10, in <module>
File "bypy-importer.py", line 203, in exec_module
File "distutils/command/install.py", line 18, in <module>
ImportError: cannot import name 'USER_BASE' from 'site' (/opt/calibre/lib/calibre-extensions/python-lib.bypy.frozen/site.pyc)
|
You are welcome to add USER_BASE to site.py.
Its not out of date as far as I know and if you want help with something failing, post the error message and ask for help.
|