mysql 安装程序无法识别 python 3.4
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/30467495/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
mysql installer fails to recognize python 3.4
提问by WeaselFox
I'm trying to istall mysql server on a windows 7 machine - that has python 3.4.3 installed. However, when trying to install the python connectors for 3.4, the installer fails to recognize the python installation, saying python 3.4 is not installed
.
我正在尝试在安装了 python 3.4.3 的 Windows 7 机器上安装 mysql 服务器。但是,当尝试为 3.4 安装 python 连接器时,安装程序无法识别 python 安装,说python 3.4 is not installed
.
Has anyone solved this issue before? I'ts driving me nuts...
以前有人解决过这个问题吗?我没把我逼疯...
回答by Andy
Just to add to the murkiness, I had the same error with current version of MySql install when attempting with python 3.5 installed (which is the latest python download). Long story short, I uninstalled python 3.5, installed python 3.4.4 (which interestingly didn't update PATH so I updated it manually) and reran installer and it found the python installation.
只是为了增加模糊性,在尝试安装 python 3.5(这是最新的 python 下载)时,我在当前版本的 MySql 安装中遇到了同样的错误。长话短说,我卸载了 python 3.5,安装了 python 3.4.4(有趣的是它没有更新 PATH,所以我手动更新了它)并重新运行安装程序,它找到了 python 安装。
So my conclusion is the MySql installer is tied to certain versions of the add-on products which in this case meant specifically python 3.4
所以我的结论是 MySql 安装程序与附加产品的某些版本相关联,在这种情况下,这特别意味着 python 3.4
回答by bvmcode
just in case anyone else has this issue in future. Look at what bit version you have for Python 3.4. When I installed 64 bit version of Python 3.4, this issue went away.
以防万一其他人将来遇到这个问题。查看 Python 3.4 的位版本。当我安装 64 位版本的 Python 3.4 时,这个问题就消失了。
回答by Christian Specht
I ran into a similar issue with Python 3.7.2.
我在 Python 3.7.2 中遇到了类似的问题。
In my case, the problem was that I tried to install the 64 bitMySQL connector, but had the 32 bitversion of Python installed on my machine.
就我而言,问题是我尝试安装64 位MySQL 连接器,但在我的机器上安装了32 位版本的 Python。
I got a similar error message:
我收到了类似的错误消息:
Python v3.7 not found. We only support Python installed using the Microsoft Windows Installer (MSI) [...]
未找到 Python v3.7。我们仅支持使用 Microsoft Windows Installer (MSI) [...]
The problem just went away by installing the 32 bitMySQL connector instead.
通过安装32 位MySQL 连接器,问题就消失了。
回答by BK435
From my experience if you have both Py2.7 and Py3.4 installed when installing the mysql connector for py3.4 you will run into this issue. Not sure of the WHY but for some reason if you have py2.7 installed, the py3.4 mysql connector recognizes that version first and just assumes that you have py2.7 installed and does not recognize that py3.4 is installed.
根据我的经验,如果您在为 py3.4 安装 mysql 连接器时同时安装了 Py2.7 和 Py3.4,您将遇到此问题。不确定为什么,但出于某种原因,如果您安装了 py2.7,py3.4 mysql 连接器首先识别该版本,并假设您安装了 py2.7,但无法识别安装了 py3.4。
The only way I have found around this is to uninstall py2.7 and then install the py3.4 mysql connector. You can always install py2.7 again after the fact.
我发现解决此问题的唯一方法是卸载 py2.7,然后安装 py3.4 mysql 连接器。事后您始终可以再次安装 py2.7。
回答by Maysam Jahromi
I had 3.6.X version and it could not see it; I uninstalled it and installed 3.4.0 version and it passed the requirement. https://www.python.org/downloads/release/python-340/
我有 3.6.X 版本,它看不到它;我卸载了它并安装了 3.4.0 版本,它通过了要求。 https://www.python.org/downloads/release/python-340/
回答by user9823038
I was looking for an similar answer. The correct answer is that there is a bug in the mysqlconnector MSI. When python installs, it creates a registry entry under HKLM Software\Python\PythonCore\3.6-32\InstallPath however, the MSI for mysqlconnector is looking for installation path in the registry Software\Python\PythonCore\3.6\InstallPath as part of the RegLocator/registrypath variable.
我正在寻找类似的答案。正确答案是 mysqlconnector MSI 中存在错误。当 python 安装时,它会在 HKLM Software\Python\PythonCore\3.6-32\InstallPath 下创建一个注册表项,但是,mysqlconnector 的 MSI 正在注册表 Software\Python\PythonCore\3.6\InstallPath 中寻找安装路径作为 RegLocator 的一部分/registrypath 变量。
Use ORCA to edit the MSI, change the RegLocator so that -32 is in the path. It will install now without error or changes to the system.
使用 ORCA 编辑 MSI,更改 RegLocator 以便 -32 在路径中。它将立即安装,不会出现错误或对系统进行更改。
回答by Hughesy
Had the same problem and have fixed it. Using a Windows 7 PC and I already had multiple versions of Python installed.
有同样的问题并已修复它。使用 Windows 7 PC,我已经安装了多个版本的 Python。
- Uninstalled all versions of Python from my PC
- Uninstalled the failed MySQL install
- Restarted PC
Re-installed Python 3.7 64-bit (the currently required version for MySQL)
Installed the Python 3.7 MySQL Connector separatelythrough the link below https://dev.mysql.com/downloads/connector/python/
Once that was installed, restarted the MySQL install
The MySQL Installer window will open and already show the Python 3.7 MySQL Connector in the list of products
Click "Add" at the top-right and select all of the products you want and then install them
You should then be able to complete the MySQL setup
- 从我的 PC 上卸载所有版本的 Python
- 卸载失败的 MySQL 安装
- 重启电脑
重新安装 Python 3.7 64 位(MySQL 当前所需的版本)
通过以下链接 单独安装了 Python 3.7 MySQL Connector https://dev.mysql.com/downloads/connector/python/
安装完成后,重新启动 MySQL 安装
MySQL 安装程序窗口将打开并已在产品列表中显示 Python 3.7 MySQL 连接器
点击右上角的“添加”,选择你想要的所有产品,然后安装它们
然后您应该能够完成 MySQL 设置
回答by Federico Caccia
I had this problem until I discovered I had installed python based in another architecture (32b). MySQL required 64 bit.
我遇到了这个问题,直到我发现我安装了基于另一种架构 (32b) 的 python。MySQL 需要 64 位。
回答by PumpkinBreath
Make sure you have the 64bit version of whichever version of Python you are running. It can be downloaded from here: https://www.python.org/downloads/windows/Just had the same problem and this solved it for me. I also uninstalled all previous versions of Python before running the mysql setup
确保您拥有正在运行的任何 Python 版本的 64 位版本。它可以从这里下载:https: //www.python.org/downloads/windows/刚刚遇到了同样的问题,这为我解决了。在运行 mysql 安装程序之前,我还卸载了所有以前版本的 Python