安装Django:使用XAMPP的MySQL、mysqlpython1.2.3和1.2.4错误?

2024-09-28 19:26:33 发布

您现在位置:Python中文网/ 问答频道 /正文

下面是this关于如何安装python的精彩演练。在

我不认为我有真正的问题,因为…我想我可以在我的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没有安装,但是我认为它安装了,因为这个命令可以工作。。。在

^{pr2}$

所以我有点好奇,关于找不到系统文件的错误信息是从哪里来的。在

我也尝试过安装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 python 1.2.3/1.2.4

Django 1.5.1款

XAMP3.1.0、Apache2.4.3、MySQL5.5.32

Python 2.7.5 64位

Windows 7 64位


Tags: installtodjangoeggpackageslocaleasymysql
1条回答
网友
1楼 · 发布于 2024-09-28 19:26:33

主要问题是:

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

这意味着你的C和{}没有被编译。如果您最近安装了Visual Studio 2012,请按照我的回答here查找问题的解决方案。在

相关问题 更多 >