3

Please help me to solve this error

C:\Python26\Lib\site-packages\pyqrcode\encoder>python setup.py install
running install
running bdist_egg
running egg_info
writing qrcode.egg-info\PKG-INFO
writing top-level names to qrcode.egg-info\top_level.txt
writing dependency_links to qrcode.egg-info\dependency_links.txt
package init file 'qrcode\__init__.py' not found (or not a regular file)
writing manifest file 'qrcode.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
running build_ext
building 'qrcode.Encoder' extension
error: Unable to find vcvarsall.bat

Thanks,

manu

pyfunc
  • 65,343
  • 15
  • 148
  • 136
manu
  • 121
  • 1
  • 3
  • 5
  • Using code section makes it better for others to read :) – pyfunc Oct 07 '10 at 05:49
  • The top answer here helped me with the same problem: http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat – Amy B Jul 06 '11 at 10:45

2 Answers2

17

Distutils does not play well with MS Compiler tool chain.

This file is required to setup the environment which will help distutils to use MS compiler tool chains.

There are quite a few ways in which this has been made to work.

Please look at the following post which may help you.

The link goes to archive.org, since the original page went away.

Tomalak
  • 332,285
  • 67
  • 532
  • 628
pyfunc
  • 65,343
  • 15
  • 148
  • 136
  • 1
    I wish I could up-vote this more than once. I've been having issues with compiling the neo4j.py package on Windows and this is the only suggestion that has helped. I've tried MinGW after running into the vcvarsall.bat issue but went back to Visual Studio after running into some compiler flag issues. Thanks! – Steve Kalemkiewicz Jul 25 '11 at 19:58
  • 1
    @Kugel: Blog seems to be down at the moment. Please see some details that are as appropriate. http://blog.victorjabur.com/2011/06/05/compiling-python-2-7-modules-on-windows-32-and-64-using-msvc-2008-express/ – pyfunc Dec 23 '11 at 00:02
  • Finally an answer that doesn't involve using Mingw32. Thank you so much! – airstrike Apr 05 '12 at 21:04
  • BTW link is dead even on archive.org – The Godfather May 22 '15 at 11:01
4

This was a known bug, and should not be an issue anymore.

If using MinGW, try:

setup.py install build ––compiler=mingw32
Wok
  • 4,956
  • 7
  • 42
  • 64
  • Below error occur C:\MinGW\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Iencoder/./src/ -IC:\Python26\i nclude -IC:\Python26\PC -c encoder/Encoder.c -o build\temp.win32-2.6\Release\enc oder\encoder.o gcc: encoder/Encoder.c: No such file or directory gcc: no input files error: command 'gcc' failed with exit status 1 – manu Oct 07 '10 at 07:07
  • c: No such file or directory gcc: no input files error: command 'gcc' failed with exit status 1 – manu Oct 07 '10 at 07:11