安装mysql-connector-python-8.0.11-py3.6遇到问题
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了安装mysql-connector-python-8.0.11-py3.6遇到问题,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含2190字,纯文字阅读大概需要4分钟。
内容图文
![安装mysql-connector-python-8.0.11-py3.6遇到问题](/upload/InfoBanner/zyjiaocheng/1133/d2fcab9d299d4aa1a2db4eab98311d3d.jpg)
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代码更新注册表信息即可
![技术分享图片](/img/jia.gif)
![技术分享图片](/img/jian.gif)
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 * 20except ImportError: 21from _winreg import * 2223# tweak as necessary24 version = sys.version[:3] 25 installpath = sys.prefix 2627 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) 323334def RegisterPy(): 35try: 36 reg = OpenKey(HKEY_CURRENT_USER, regpath) 37except EnvironmentError as e: 38try: 39 reg = CreateKey(HKEY_CURRENT_USER, regpath) 40 SetValue(reg, installkey, REG_SZ, installpath) 41 SetValue(reg, pythonkey, REG_SZ, pythonpath) 42 CloseKey(reg) 43except: 44print("*** Unable to register!") 45return46print("--- Python", version, "is now registered!") 47return48if (QueryValue(reg, installkey) == installpath and49 QueryValue(reg, pythonkey) == pythonpath): 50 CloseKey(reg) 51print("=== Python", version, "is already registered!") 52return53 CloseKey(reg) 54print("*** Unable to register!") 55print("*** You probably have another Python installation!") 5657if__name__ == "__main__": 58 RegisterPy()
原文:https://www.cnblogs.com/jeane/p/9728679.html
内容总结
以上是互联网集市为您收集整理的安装mysql-connector-python-8.0.11-py3.6遇到问题全部内容,希望文章能够帮你解决安装mysql-connector-python-8.0.11-py3.6遇到问题所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。