-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesOS-androidstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Running the following command:
python3 -m ensurepip
produces the following exception traceback on Android with the armv8l architecture:
ERROR: Exception:
Traceback (most recent call last):
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/base_command.py", line 105, in _run_wrapper
status = _inner_run()
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/base_command.py", line 96, in _inner_run
return self.run(options, args)
~~~~~~~~^^^^^^^^^^^^^^^
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/req_command.py", line 67, in wrapper
return func(self, options, args)
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/commands/install.py", line 325, in run
session = self.get_default_session(options)
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/index_command.py", line 76, in get_default_session
self._session = self.enter_context(self._build_session(options))
~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/cli/index_command.py", line 99, in _build_session
session = PipSession(
cache=os.path.join(cache_dir, "http-v2") if cache_dir else None,
...<3 lines>...
ssl_context=ssl_context,
)
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/network/session.py", line 344, in __init__
self.headers["User-Agent"] = user_agent()
~~~~~~~~~~^^
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/network/session.py", line 177, in user_agent
setuptools_dist = get_default_environment().get_distribution("setuptools")
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/metadata/importlib/_envs.py", line 189, in get_distribution
return next(matches, None)
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/metadata/importlib/_envs.py", line 186, in <genexpr>
for distribution in self.iter_all_distributions()
~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
for dist in self._iter_distributions():
~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions
for dist in finder.find_eggs(location):
~~~~~~~~~~~~~~~~^^^^^^^^^^
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/metadata/importlib/_envs.py", line 145, in find_eggs
yield from self._find_eggs_in_zip(location)
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_internal/metadata/importlib/_envs.py", line 122, in _find_eggs_in_zip
from pip._vendor.pkg_resources import find_eggs_in_zip
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 1126, in <module>
class Environment:
...<189 lines>...
return new
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 1132, in Environment
platform: str | None = get_supported_platform(),
~~~~~~~~~~~~~~~~~~~~~~^^
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 212, in get_supported_platform
plat = get_build_platform()
File "/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl/pip/_vendor/pkg_resources/__init__.py", line 459, in get_build_platform
plat = get_platform()
File "/data/local/pydroid/usr/lib/python3.13/sysconfig/__init__.py", line 636, in get_platform
machine = {
~
...<3 lines>...
"armv7l": "armeabi_v7a",
~~~~~~~~~~~~~~~~~~~~~~~~
}[machine]
~^^^^^^^^^
KeyError: 'armv8l'
Exception ignored in: <function _DeleteDummyThreadOnDel.__del__ at 0xf3e6e078>
Traceback (most recent call last):
File "/data/local/pydroid/usr/lib/python3.13/threading.py", line 1383, in __del__
TypeError: 'NoneType' object does not support the context manager protocol
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/data/local/pydroid/usr/lib/python3.13/ensurepip/__main__.py", line 5, in <module>
sys.exit(ensurepip._main())
~~~~~~~~~~~~~~~^^
File "/data/local/pydroid/usr/lib/python3.13/ensurepip/__init__.py", line 257, in _main
return _bootstrap(
root=args.root,
...<4 lines>...
default_pip=args.default_pip,
)
File "/data/local/pydroid/usr/lib/python3.13/ensurepip/__init__.py", line 172, in _bootstrap
return _run_pip([*args, "pip"], [os.fsdecode(tmp_wheel_path)])
File "/data/local/pydroid/usr/lib/python3.13/ensurepip/__init__.py", line 87, in _run_pip
return subprocess.run(cmd, check=True).returncode
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/data/local/pydroid/usr/lib/python3.13/subprocess.py", line 579, in run
raise CalledProcessError(retcode, process.args,
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/data/local/pydroid/usr/bin/python3', '-W', 'ignore::DeprecationWarning', '-c', '\nimport runpy\nimport sys\nsys.path = [\'/data/local/pydroid/.tmp/tmpl2g37zsz/pip-24.3.1-py3-none-any.whl\'] + sys.path\nsys.argv[1:] = [\'install\', \'--no-cache-dir\', \'--no-index\', \'--find-links\', \'/data/local/pydroid/.tmp/tmpl2g37zsz\', \'--upgrade\', \'pip\']\nrunpy.run_module("pip", run_name="__main__", alter_sys=True)\n']' returned non-zero exit status 2.
The original problem was reported here: Mrakorez/pydroid#2
CPython versions tested on:
3.13
Operating systems tested on:
Other
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesOS-androidstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error