安装mysql-python(Windows) [英] Install mysql-python (Windows)
问题描述
- 我已经下载了easy_install
- 我已经下载了Cygwin64能够运行Linux命令(Win cmd驱使我疯狂)
- 我输入了:easy_install mysql-python(给我一个错误消息,说它找不到vcvarsall.bat)
- 我已经下载了Visual Studio 2010.然而,我卸载它,因为我发现我已经有一些其他版本(它没有解决问题)
我已经把这个问题像一千次,所以如果有人能帮我,我会非常感激的。感谢提前!
编辑:我发现这一点: https://pypi.python.org/pypi/MySQL-python/1.2.5 。这是否意味着我无法使用python 3.3运行Django?如果有一个.exe文件,那么为什么要去处理所有这些工作?
你将要要以这种方式将Python添加到您的路径环境变量中。转到:
- 我的电脑
- 系统属性
- 高级系统设置
- 在高级选项卡下,单击说明环境变量的按钮
- 然后在系统变量下,您将要添加/更改以下变量:
PYTHONPATH
和路径
。这是一个粘贴我的变量的样子:
PYTHONPATH
C:\Python27; C:\Python27\Lib\site-packages; C:\Python27\Lib; C:\Python27 \DLLs; C:\Python27\Lib\lib-tk; C:\Python27\Scripts
路径
C:\Program Files\MySQL\MySQL Utilities 1.3.5\; C:\Python27; C:\Python27\Lib\site-包; C:\Python27\Lib; C:\Python27\DLLs; C:\Python27\\ \\ Lib\lib-tk; C:\Python27\Scripts
您的路径可能不同,所以请调整它们,但是这个配置对我有用,你应该可以在进行这些更改后运行MySQL。
I've spent hours trying to make Django work on my computer. The problem is that I can't install the mysql-python package. I'm running Windows 7 64bit. This is what I've tried:
- I have downloaded easy_install
- I have downloaded Cygwin64 to be able to run Linux commands (Win cmd was driving me crazy)
- I have typed in: easy_install mysql-python (gave me an error message saying it can't find vcvarsall.bat)
- I have downloaded Visual Studio 2010. However, I uninstalled it since I found out that I had some other version of it already (it didn't solve the problem)
I have googled this problem like a thousand times, so I would be very grateful if someone could help me. Thanks in advance!
EDIT: I discovered this: https://pypi.python.org/pypi/MySQL-python/1.2.5. Does this mean I can't run Django with python 3.3? And why bother to go through all this work if there is an .exe-file out there?
You're going to want to add Python to your Path Environment Variable in this way. Go to:
- My Computer
- System Properties
- Advance System Settings
- Under the "Advanced" tab click the button that says "Environment Variables"
- Then under System Variables you are going to want to add / change the following variables:
PYTHONPATH
andPath
. Here is a paste of what my variables look like:
PYTHONPATH
C:\Python27;C:\Python27\Lib\site-packages;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Python27\Scripts
Path
C:\Program Files\MySQL\MySQL Utilities 1.3.5\;C:\Python27;C:\Python27\Lib\site-packages;C:\Python27\Lib;C:\Python27\DLLs;C:\Python27\Lib\lib-tk;C:\Python27\Scripts
Your Path's might be different, so please adjust them, but this configuration works for me and you should be able to run MySQL after making these changes.
这篇关于安装mysql-python(Windows)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!