我花了几个小时试图让 Django 在我的电脑上运行.问题是我无法安装 mysql-python 包.我正在运行 Windows 7 64 位.这是我试过的:
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 googled this problem like a thousand times, so I would be very grateful if someone could help me. Thanks in advance!
我发现了这个:https://pypi.python.org/pypi/MySQL-python/1.2.5.这是否意味着我不能用 python 3.3 运行 Django?如果那里有一个 .exe 文件,为什么还要费心去完成所有这些工作?
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?
您将希望以这种方式将 Python 添加到您的路径环境变量中.前往:
You're going to want to add Python to your Path Environment Variable in this way. Go to:
PYTHONPATH
和 Path
.这是我的变量外观的粘贴:PYTHONPATH
and Path
. 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
路径
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
你的路径可能不同,所以请调整它们,但这个配置对我有用,你应该能够在进行这些更改后运行 MySQL.
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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!