網站首頁 編程語言 正文
Fatal Python error: Py_Initialize: unable to load the file system codec
作者:NoOne-csdn 更新時間: 2022-04-01 編程語言打開terminal報錯
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: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
分析原因:
想清理python的安裝版本,刪掉一些文件后就出現如此了,手賤……
解決:
1. sudo vim /etc/profile/
2. export PYTHONHOME=/Library/Frameworks/Python.framework/Versions/3.7
export PYTHONPATH=.:$PYTHONHOME/bin:$PYTHONHOME/site-packages
export PATH=$PATH:$PYTHONHOME:$PYTHONP
運行之后報錯
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
繼續修改
刪掉關于anaconda有關的環境變量
perfect!
原文鏈接:https://blog.csdn.net/weixin_40161254/article/details/88576220
相關推薦
- 2022-12-27 Go學習筆記之map的聲明和初始化_Golang
- 2022-06-26 Python實現將多張圖片合成視頻并加入背景音樂_python
- 2022-01-29 git 本地,遠程做了不同的修改,同步方法
- 2022-07-01 C語言詳細講解strcpy?strcat?strcmp函數的模擬實現_C 語言
- 2022-05-20 springCloud_Feign遠程調用
- 2022-06-15 golang?gorm的關系關聯實現示例_Golang
- 2022-07-27 python將多個py文件和其他文件打包為exe可執行文件_python
- 2024-07-15 GIT同步修改后的遠程分支
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支