✓ 已被采纳 从报错来看,应该是使用 Python3 中的 pip3 尝试安装 logging 这个包,而这个实际上是个 Python2 语法的包,所以报语法错误。用Python2 中 pip 安装就不会报错,但 logging 是内置库,理论上是不需要安装的,怀疑安装目的(升级?)。 有用2 回复 神圣之风: 我画蛇添足了... 回复2021-11-21 ...
pip install logging给出了这个错误消息: Collecting logging Using cached logging-0.4.9.6.tar.gz (96 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [60 lines of output] Traceback ...
Suppress location mismatch warnings when pip is invoked from a Python source tree, so ensurepip does not emit warnings on CPython make install. (#10270) On Python 3.10 or later, the installation scheme backend has been changed to use sysconfig. This is to anticipate the deprecation of distutil...
import RefactoringTool, get_fixers_from_package File "/usr/lib/python3.6/lib2to3/refactor.py", line 17, in <module> import logging File "/tmp/pip-build-d1761e8t/logging/logging/__init__.py", line 618 raise NotImplementedError, 'emit must be implemented '\ ^ SyntaxError: invalid syntax...
in <module> import logging File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-rtc9srqc\logging_da0c 51cd1da54dfb9010710c04d8ece1\logging\__init__.py", line 618 raise NotImplementedError, 'emit must be implemented '\ ^ SyntaxError: invalid syntax --- WARNING: Discarding https://file...
in <module> import logging File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-rtc9srqc\logging_da0c 51cd1da54dfb9010710c04d8ece1\logging\__init__.py", line 618 raise NotImplementedError, 'emit must be implemented '\ ^ SyntaxError: invalid syntax --- WARNING: Discarding https://file...