window下安裝Python
直接去Python官網下載msi安裝程序安裝即可(選擇自定義安裝才能修改程序安裝路徑哦)
widows下Python的數據庫訪問模塊PyMysql的安裝
1.open the cmd execute the following command or enter "cmd /k "cd \PythonScriptPath\"" to a batch file and execute the batch please replace the "PythonScriptPath" for your PythonScriptPath C:\> cd \PythonScriptPath\ 2.use pip to install the pymysql C:\> python pip.exe install pyMysql
demo for use pymysql in cmd
命令執行的返回結果已省略
C:\>python >>> import pymysql >>> conn = pymysql.connect(host="localhost",user="root",password="root",db="test",charset="utf8mb4") >>> cursor = conn.cursor() >>> row = cursor.execute("select version()") >>> print (row) >>> result = cursor.fetchone() >>> print (result) >>> cursor.close() >>> exit()
windows下PHP的Python擴展PPython的安裝
到這里下載,里面有詳細的使用說明:https://download.csdn.net/download/vancevol/10696481