我最近重新安装了ubuntu并升级到16.04并且无法使用python:
$ python manage.py runserver
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 get the locale encoding
ImportError: No module named 'encodings'
Aborted
此时,python本身不起作用
$ python
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 get the locale encoding
ImportError: No module named 'encodings'
Aborted
即使这个建议不再有效:
unset PYTHONHOME
unset PYTHONPATH
每一次我都以一种方式修复它,它又回来了。几个答案有助于暂时解决它,但不是很好。我已经多次重新安装了python和python3。我能从这里做什么?谢谢
蝴蝶不菲
烙印99
相关分类