I have a pypy installed with homebrew on OSX 12.5.1
➜ ~ pypy3.10 --version
Python 3.10.12 (af44d0b8114cb82c40a07bb9ee9c1ca8a1b3688c, Jun 25 2023, 12:34:25)
[PyPy 7.3.12 with GCC Apple LLVM 14.0.0 (clang-1400.0.29.202)]
I'm getting the following error while trying to import loguru:
>>>> import loguru
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/Cellar/pypy3.10/7.3.12/libexec/lib/pypy3.10/site-packages/loguru/__init__.py", line 31, in <module>
logger.add(_sys.stderr)
File "/opt/homebrew/Cellar/pypy3.10/7.3.12/libexec/lib/pypy3.10/site-packages/loguru/_logger.py", line 979, in add
exception_formatter = ExceptionFormatter(
File "/opt/homebrew/Cellar/pypy3.10/7.3.12/libexec/lib/pypy3.10/site-packages/loguru/_better_exceptions.py", line 157, in __init__
self._lib_dirs = self._get_lib_dirs()
File "/opt/homebrew/Cellar/pypy3.10/7.3.12/libexec/lib/pypy3.10/site-packages/loguru/_better_exceptions.py", line 166, in _get_lib_dirs
paths = {sysconfig.get_path(name, scheme) for scheme in schemes for name in names}
File "/opt/homebrew/Cellar/pypy3.10/7.3.12/libexec/lib/pypy3.10/site-packages/loguru/_better_exceptions.py", line 166, in <setcomp>
paths = {sysconfig.get_path(name, scheme) for scheme in schemes for name in names}
File "/opt/homebrew/Cellar/pypy3.10/7.3.12/libexec/lib/pypy3.10/sysconfig.py", line 596, in get_path
return get_paths(scheme, vars, expand)[name]
KeyError: 'platstdlib'
I have been able to localize it to concrete key osx_framework_user:
>>>> sysconfig.get_path("platstdlib", "osx_framework_user")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/homebrew/Cellar/pypy3.10/7.3.12/libexec/lib/pypy3.10/sysconfig.py", line 596, in get_path
return get_paths(scheme, vars, expand)[name]
KeyError: 'platstdlib'
This is because platstdlib corresponding key has leading spaces for some reason:
I have a pypy installed with homebrew on OSX 12.5.1
I'm getting the following error while trying to import loguru:
I have been able to localize it to concrete key
osx_framework_user
:This is because
platstdlib
corresponding key has leading spaces for some reason:)