2021-10-08

Fatal Python error: init_fs_encoding: failed to get the Python codec of the file

1.平台:VS2017+Boost.python+Anaconada
2.原因:因计算机环境设置不全;
3.错误提示的完整信息:
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = ‘python’
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = ‘F:\Documents\Visual Studio 2017\Projects\Project1
\x64\Debug\Project1.exe’
sys.base_prefix = ‘C:\Users\usts181009\anaconda3’
sys.base_exec_prefix = ‘C:\Users\usts181009\anaconda3’
sys.executable = ‘F:\Documents\Visual Studio 2017\Projects\Project1\x64\
Debug\Project1.exe’
sys.prefix = ‘C:\Users\usts181009\anaconda3’
sys.exec_prefix = ‘C:\Users\usts181009\anaconda3’
sys.path = [
‘C:\Users\usts181009\anaconda3\python38.zip’,
‘.\DLLs’,
‘.\lib’,
‘F:\Documents\Visual Studio 2017\Projects\Project1\x64\Debug’,
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the file
system encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named ‘encodings’

4.错误出现时机:Debug
5.参照其它大咖的提示:Fatal Python error: initfsencoding: unable to load the file system codec. Module
6.处理方法:]
在这里插入图片描述
6.接下来,重启Visual Studio,否则可能依旧会报错

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值