没有名为' codecs'的模块 - -苹果

发布于 2025-02-02 22:20:43 字数 1603 浏览 2 评论 0原文

我一直在拼命尝试通过自己的问题来解决我的问题,并在互联网上寻找一些信息。但是,他们都无法解决我的问题。我已经编程了2 - 3年,这是我第一次看到这个错误。如果不解决它,我无法进行任何编程。 以下是我键入“ PIP3安装编解码器”时的错误(或键入PIP install也出现相同的错误)。

Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8'
  sys.base_prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.base_exec_prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.executable = '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8'
  sys.prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.exec_prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.path = [
    '/Library/Frameworks/Python.framework/Versions/3.8/lib/python38.zip',
    '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8',
    '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/encodings/__init__.py", line 31, in <module>
ModuleNotFoundError: No module named 'codecs'

我需要帮助,谢谢!!!

I've been desperately trying to solve my problem by my own, looking some information on the Internet. However, none of them can solve my problem. I've been programming for 2-3 years, this is my first time seeing this error. I can't do any programming without solving it.
The following is my error when I type "pip3 install codecs" (or type pip install also ran the same error).

Could not find platform independent libraries <prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8'
  sys.base_prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.base_exec_prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.executable = '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8'
  sys.prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.exec_prefix = '/Library/Frameworks/Python.framework/Versions/3.8'
  sys.path = [
    '/Library/Frameworks/Python.framework/Versions/3.8/lib/python38.zip',
    '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8',
    '/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/encodings/__init__.py", line 31, in <module>
ModuleNotFoundError: No module named 'codecs'

I need help, thanks!!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文