Sublime Text3執行python時,顯示不出影象
阿新 • • 發佈:2018-12-15
版本:python3 解決方法:
- 找到exec.py檔案 路徑: 我的是:…\Sublime Text 3\Packages\Default C:\Users\apple\AppData\Roaming\Sublime Text 3\Packages\Default
- 用Sublime Text3開啟
- 此處:
# Hide the console window on Windows startupinfo = None if os.name == "nt": startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
將最後一行註釋掉:
# Hide the console window on Windows
startupinfo = None
if os.name == "nt":
startupinfo = subprocess.STARTUPINFO()
#startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
注:使用matplotlib顯示時,要加一句plt.show(),照搬jupyter notebook的程式碼是不行的