简体   繁体   English

为Python 2.5安装MySQLdb Windows

[英]Installing MySQLdb windows for Python 2.5

I have seen this issue come up a lot on these discussion boards but I am still having trouble finding an answer. 我已经在这些讨论板上看到了很多问题,但是我仍然很难找到答案。 I am trying to install MySQLdb for Python 2.5 on my Windows Vista machine. 我正在尝试在Windows Vista计算机上为Python 2.5安装MySQLdb。 I grabbed the installation file from this link 我从此链接获取了安装文件

http://sourceforge.net/projects/mysql-python/reviews/ http://sourceforge.net/projects/mysql-python/reviews/

I then opened my Windows command prompt and entered "cd MYSQL-python-1.2.3". 然后,我打开Windows命令提示符并输入“ cd MYSQL-python-1.2.3”。

I then entered "python setup.py build" 然后我输入了“ python setup.py build”

At this point, it gives me an error: "File setup.py, line 5, in module ImportError: No module named setuptools" 此时,它给我一个错误:“模块ImportError中的文件setup.py,第5行:没有名为setuptools的模块”

Can anyone give me some guidance on what I should do next? 谁能给我一些下一步应该怎么做的指导? I have searched the web for days regarding this issue.....I have seen several posts saying that there is no good solution for this when running Python 2.5 on Windows. 我已经在网上搜索了好几天有关此问题的信息.....我看到一些帖子说,在Windows上运行Python 2.5时,没有好的解决方案。 I hope this isn't the case. 我希望情况并非如此。 Thanks! 谢谢!

-Pete -皮特

You can install first the setuptools for python 2.5, you can find it here http://pypi.python.org/pypi/setuptools search for where it says:setuptools-0.6c11.win32-py2.3.exe (md5) 您可以先安装适用于python 2.5的setuptools,您可以在此处http://pypi.python.org/pypi/setuptools中找到它,在其中找到提示:setuptools-0.6c11.win32-py2.3.​​exe(md5)

After you install this, then try again installing mysqldb 安装此程序后,然后重试安装mysqldb

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM