網站首頁 編程語言 正文
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
相關推薦
- 2021-12-19 C語言?八大排序算法的過程圖解及實現代碼_C 語言
- 2022-05-23 Python+OpenCV實現在圖像上繪制矩形_python
- 2023-01-30 delphi?判斷字符串是否為純字母組合的函數_Delphi
- 2022-09-25 Linux系統CentOS的本地host查詢
- 2023-01-11 Android?nonTransitiveRClass資源沖突問題淺析_Android
- 2022-07-06 C#winform中數據庫綁定DataGrid的實現_C#教程
- 2022-03-29 詳解python字符串相關str_python
- 2022-07-30 jQuery?UI工具提示框部件Tooltip?Widget_jquery
- 最近更新
-
- 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同步修改后的遠程分支