日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

安装mysql-connector-python-8.0.11-py3.6遇到问题

發布時間:2023/12/9 数据库 26 豆豆
生活随笔 收集整理的這篇文章主要介紹了 安装mysql-connector-python-8.0.11-py3.6遇到问题 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.提示“This application requires Visual Studio 2015 Redistributable”

?

下載vc_redist.x86安裝即可。

下載鏈接:https://download.microsoft.com/download/6/D/F/6DF3FF94-F7F9-4F0B-838C-A328D1A7D0EE/vc_redist.x86.exe

https://download.microsoft.com/download/0/6/4/064F84EA-D1DB-4EAA-9A5C-CC2F0FF6A638/vc_redist.x64.exe

2.提示 “Python v3.6 not found”

?

第一種情況,是真的沒裝3.6版本。下載安裝即可

第二種情況,電腦是64位裝成了32位。看仔細

第三種情況,以前裝過Python2.7或者其他版本,沒卸載干凈,又裝了更高級版本。運行以下py代碼更新注冊表信息即可

1 # 2 # script to register Python 2.0 or later for use with win32all 3 # and other extensions that require Python registry settings 4 # 5 # written by Joakim Loew for Secret Labs AB / PythonWare 6 # 7 # source: 8 # http://www.pythonware.com/products/works/articles/regpy20.htm 9 # 10 # modified by Valentine Gogichashvili as described in http://www.mail-archive.com/distutils-sig@python.org/msg10512.html 11 # modified for Python 3 support by Erik Bray <erik.m.bray@gmail.com> 12 13 from __future__ import print_function 14 15 16 import sys 17 18 try: 19 from winreg import * 20 except ImportError: 21 from _winreg import * 22 23 # tweak as necessary 24 version = sys.version[:3] 25 installpath = sys.prefix 26 27 regpath = "SOFTWARE\\Python\\Pythoncore\\{0}\\".format(version) 28 installkey = "InstallPath" 29 pythonkey = "PythonPath" 30 pythonpath = "{0};{1}\\Lib\\;{2}\\DLLs\\".format( 31 installpath, installpath, installpath) 32 33 34 def RegisterPy(): 35 try: 36 reg = OpenKey(HKEY_CURRENT_USER, regpath) 37 except EnvironmentError as e: 38 try: 39 reg = CreateKey(HKEY_CURRENT_USER, regpath) 40 SetValue(reg, installkey, REG_SZ, installpath) 41 SetValue(reg, pythonkey, REG_SZ, pythonpath) 42 CloseKey(reg) 43 except: 44 print("*** Unable to register!") 45 return 46 print("--- Python", version, "is now registered!") 47 return 48 if (QueryValue(reg, installkey) == installpath and 49 QueryValue(reg, pythonkey) == pythonpath): 50 CloseKey(reg) 51 print("=== Python", version, "is already registered!") 52 return 53 CloseKey(reg) 54 print("*** Unable to register!") 55 print("*** You probably have another Python installation!") 56 57 if __name__ == "__main__": 58 RegisterPy() View Code

?

?

?

?

轉載于:https://www.cnblogs.com/jeane/p/9728679.html

總結

以上是生活随笔為你收集整理的安装mysql-connector-python-8.0.11-py3.6遇到问题的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。