我有一個python 3腳本,我從另一個Python 2.7.x腳本使用subprocess.popen調用。Eclipse - pydev - 致命的Python錯誤:Py_Initialize:無法獲取區域編碼
myproc = subprocess.Popen(
"/path/to/my/python/3/script",
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=mypwd,
shell=True)
當我使用Eclipse調試這個腳本,並打印出標準錯誤我看到了以下問題:
Fatal Python error: Py_Initialize: Unable to get the locale encoding
,當我在Eclipse外部的腳本執行相同的代碼的問題是沒見過。
任何幫助解決這個將不勝感激!
剛剛添加了一個可能解決此問題的響應:https://stackoverflow.com/a/45801382/110451 –