如何将PythonHome设置回默认状态?

2024-10-01 00:16:43 发布

您现在位置:Python中文网/ 问答频道 /正文

我目前正在运行MacOS Catlina

在尝试安装openCV时,我把$PYTHONHOME搞砸了

现在,每次我打开终端,它都会持续运行,显示以下文本:

Current thread 0x0000000112226dc0 (most recent call first):
Abort trap: 6
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

这篇课文将无限重复

到目前为止,我已经尝试过这种类型(别名python/path/to/your/python/home),但它返回的结果是找不到

我在电脑上走错了地方,无法理解问题所在

请帮忙


Tags: to文本终端librariesprefixnotmacoscurrent