使用平台,適用Linux
1.安裝python支援插件
2.啟用Debug F5
Start Debugging
3.編輯python,使用
import mysql.connector
出現報錯
import mysql.connector
ModuleNotFoundError:No Module named ‘mysql’
解決方法(在terminal中執行下面的指令)
1.sudo apt-get install -y python3-pip
2.pip install mysql-connector-python
這樣就不會再報錯了
Windows 解法差不多
1.確認是不是有裝好的pip
pip –version
如果有回報版本
2.安裝connector
pip install mysql-connector-python
20231019
python Windows 環境的安裝
有幾個注意事項
1.安裝時,要啟用管理員權限安裝 Use admin privileges when installing py.exe
2.勾選 Add python.exe to PATH

之後啟用Visual Studio Code,就不會有環境變數上的問題

隨機文章
- 可拋棄式電子郵件讓你免收垃圾信 (2008-06-15)
- 機車老外 讓我氣的想罵髒話 (2010-02-19)
- 407 Proxy Authentication Required (2012-03-05)
- 台灣 常用DNS (2015-02-11)
- 備份進出的郵件 (2008-10-08)









