Installing Pygame on Windows - Error: Cannot find vcvarsall.bat

I have a 64-bit Win7 machine. I downloaded and installed Python 2.6.6 32bit. I also downloaded pygame 1.9.1 for python 2.6 and tried to install it. I got:

C:\pygame-1.9.1release>setup.py install .... running build_ext building 'pygame._numericsurfarray' extension error: Unable to find vcvarsall.bat 

What should I do?
(I don't have any compiler or visual studio or anything installed if that matters)

+1
source share
2 answers

On PyGame download page - use the msi file, which is a separate Windows installation, instead of loading the source and executing:

 setup.py install 
+4
source

I had a similar problem with the (Traits) package a couple of weeks ago - for me it was because the package was trying to compile the extensions and I did not have Visual Studio. MinGW installation and direct Python worked for me to use as a compiler in the distutils.cfg configuration file in \ Lib \ distutils in your Python installation folder. It looks like this page can automate the whole process for you; if you prefer to do it manually here, the contents of my distutils.cfg:

[build]

compiler = mingw32

Restart setup.py and you should be good to go.

+2
source

Source: https://habr.com/ru/post/958505/


All Articles