我已经安装了Python 3.5,并且正在运行

pip install mysql-python

它给出了如下错误

错误:Microsoft Visual c++ 14.0是必需的(无法找到vcvarsall.bat)

我已经添加了以下行到我的路径

C:\Program Files\Python 3.5\Scripts\;
C:\Program Files\Python 3.5\;

C:\Windows\System32;
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC;
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC

我的电脑上安装了64位的Windows 7。

什么解决方案可以减少这个错误,并通过pip正确安装模块。

我在编译我写的c++程序时遇到了一些困难。

这个程序非常简单,据我所知,它符合c++标准中规定的所有规则。我已经把ISO/IEC 14882:2003通读了两遍。

程序如下:

下面是我在尝试用Visual c++ 2010编译这个程序时收到的输出:

c:\dev>cl /nologo helloworld.png
cl : Command line warning D9024 : unrecognized source file type 'helloworld.png', object file assumed
helloworld.png : fatal error LNK1107: invalid or corrupt file: cannot read at 0x5172

沮丧地,我尝试了g++ 4.5.2,但它同样没有帮助:

c:\dev>g++ helloworld.png
helloworld.png: file not recognized: File format not recognized
collect2: ld returned 1 exit status

我认为Clang(3.0版本trunk 127530)一定可以工作,因为它的标准一致性受到了高度赞扬。不幸的是,它甚至没有给我一个漂亮的,突出显示的错误消息:

c:\dev>clang++ helloworld.png
helloworld.png: file not recognized: File format not recognized
collect2: ld returned 1 exit status
clang++: error: linker (via gcc) command failed with exit code 1 (use -v to see invocation)

老实说,我真的不知道这些错误消息是什么意思。

许多其他c++程序都有扩展名为.cpp的源文件,所以我想可能需要重命名我的文件。我把它的名字改为helloworld.cpp,但这并没有帮助。我认为Clang有一个非常严重的错误,因为当我试图用它来编译重命名的程序时,它跳出来,打印出“84个警告和20个错误生成”,让我的计算机发出很多哔哔声!

我哪里做错了?我是否错过了c++标准的某些关键部分?或者这三个编译器真的坏到不能编译这个简单的程序?

当我在Visual Studio 2010中启动一个项目时,会自动生成一个名为stdafx.h的文件。我需要做一个跨平台的c++库,所以我不/不能使用这个头文件。

stdafx.h用于什么?我可以删除这个头文件吗?