2013-07-13 52 views
0

我下面this真棒步行通過關於如何安裝Python。安裝Django:使用XAMPP的MySQL,MySQL-python 1.2.3&1.2.4錯誤?

我不認爲我有一個真正的問題,因爲......我想我能在我的Django項目工作...但是我遇到了,我只是種跳過了幾個錯誤,我是想知道他們來自哪裏。

一切都進行得順順當當,直到我的地方,我安裝MySQL-python的一部分。我實際上是通過XAMPP使用MySQL的......所以如果這是問題,請告訴我。

我嘗試安裝MySQL-python的V1.2.3和得到這個錯誤:

Processing MySQL-python-1.2.3.win-amd64-py2.7.exe 
creating 'c:\users\quentin\appdata\local\temp\easy_install-reydf8\MySQL_python-1.2.3-py2.7-win32.egg' and adding 'c:\users\quentin\appdata\local\temp\easy_install-reydf8\MySQL_python-1.2.3-py2.7-win32.egg.tmp' to it 
Moving MySQL_python-1.2.3-py2.7-win32.egg to c:\virtualenvs\django_tutorial\lib\site-packages 
Adding MySQL-python 1.2.3 to easy-install.pth file 

Installed c:\virtualenvs\django_tutorial\lib\site-packages\mysql_python-1.2.3-py2.7-win32.egg 
Processing dependencies for MySQL-python==1.2.3 
Searching for MySQL-python==1.2.3 
Reading http://pypi.python.org/simple/MySQL-python/ 
Best match: MySQL-python 1.2.3 
Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz#md5=215eddb6d853f6f4be5b4afc4154292f 
Processing MySQL-python-1.2.3.tar.gz 
Running MySQL-python-1.2.3\setup.py -q bdist_egg --dist-dir c:\users\quentin\appdata\local\temp\easy_install-cnlqlk\MySQL-python-1.2.3\egg-dist-tmp-iaalng 
error: The system cannot find the file specified 

所以通常我會想到的是1.2.3沒有安裝,但我認爲它確實是因爲這個命令的作品?

python manage.py syncdb 

所以我有點好奇怎麼樣沒有找到系統文件錯誤消息是從。

我也嘗試安裝V1.2.4,我得到一個類似的錯誤關於尋找另一個文件:

(django_tutorial) C:\django_projects\insults>easy_install file://c:/users/quentin/downloads/mysql-python-1.2.4.win-amd64-py2.7.exe 
Processing mysql-python-1.2.4.win-amd64-py2.7.exe 
creating 'c:\users\quentin\appdata\local\temp\easy_install-hz3ivi\MySQL_python-1.2.4-py2.7-win32.egg' and adding 'c:\users\quentin\appdata\local\temp\easy_install-hz3ivi\MySQL_python-1.2.4-py2.7-win32.egg.tmp' to it 
Moving MySQL_python-1.2.4-py2.7-win32.egg to c:\virtualenvs\django_tutorial\lib\site-packages 
Removing mysql-python 1.2.3 from easy-install.pth file 
Adding MySQL-python 1.2.4 to easy-install.pth file 

Installed c:\virtualenvs\django_tutorial\lib\site-packages\mysql_python-1.2.4-py2.7-win32.egg 
Processing dependencies for MySQL-python==1.2.4 
Searching for MySQL-python==1.2.4 
Reading http://pypi.python.org/simple/MySQL-python/ 
Best match: MySQL-python 1.2.4 
Downloading https://pypi.python.org/packages/source/M/MySQL-python/MySQL-python1.2.4.zip#md5=ddf2386daf10a97af115ffad2ed4a9a0 
Processing MySQL-python-1.2.4.zip 
Running MySQL-python-1.2.4\setup.py -q bdist_egg --dist-dir c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\egg-dist-tmp-2ltuob 
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.28.tar.gz 
Extracting in c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\temp\tmpemj6wf 
Now working in c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\temp\tmpemj6wf\distribute-0.6.28 
Building a Distribute egg in c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4 
c:\users\quentin\appdata\local\temp\easy_install-v0_gfa\MySQL-python-1.2.4\distribute0.6.28-py2.7.egg 
error: Setup script exited with error: Unable to find vcvarsall.bat 

所以,是的。只是對這些錯誤感到好奇,是否應該爲他們擔心。我想,如果一切正常,我真的不有問題,但...別人也弄不清楚這一點,並會卡在Django的工作,以及安裝/設置的一部分?

編輯 確定它是不開心的時候我安裝1.2.4,但如果我只安裝1.2.3過它,執行syncdb再次工作。

的MySQL-蟒1.2.3/1.2.4

的Django 1.5.1

XAMPP3.1.0,Apache2.4.3,MySQL5.5.32

的Python 2.7.5 64位

的Windows 7 64位

+0

您可以在http://www.lfd.uci.edu/~gohlke/pythonlibs/#mysql-python – suhailvs

回答

0

的主要問題是在這裏:

Setup script exited with error: Unable to find vcvarsall.bat 

這意味着你CC++沒有編制。如果您最近安裝了Visual Studio 2012,請按照我的回答here找到解決問題的方法。

+0

下載MySQL-python windows安裝程序編譯版本。謝謝,這似乎解決了1.2.4錯誤。 1.2.3錯誤仍然顯示,但顯然它在談論不同的文件。即使出現錯誤,我仍然覺得1.2.3似乎很有效。也許這是由於邏輯錯誤或其他原因造成的錯誤消息。 – QuillyT

+0

啊,我沒有足夠的信譽upvote ...我認爲我接受它。 – QuillyT