使用平台,適用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,就不會有環境變數上的問題

隨機文章
- P2V 數種方法,手法各有不同 (2016-07-05)
- Windows 10 上沒有 NFS Client? (2016-10-12)
- Serendipity 之功能再探 (2007-11-04)
- 受保護的內容: 免費股票投資技術分析課程 (2014-06-09)
- 月亮在看你 (2008-08-29)


![[chatGPT 測試] DSM 7 有什麼特色](https://chihping.aflypen.com/wp-content/uploads/2023/03/usb-ga13f61ece_1280-300x221.jpg)






