Reputation: 17826
After googling around, I found most answers say: install mingw, then use "setup.py install build --compiler=mingw32" to install. This is what I get:
C:\Users\Joe\Desktop\pycrypto-2.6>setup.py install build --compiler=mingw32
running install
running build
running build_py
running build_ext
running build_configure
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/cygdrive/c/Users/Joe/Desktop/pycrypto-2.6':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
Traceback (most recent call last):
File "C:\Users\Joe\Desktop\pycrypto-2.6\setup.py", line 456, in <module>
core.setup(**kw)
File "C:\Python27\lib\distutils\core.py", line 152, in setup
dist.run_commands()
File "C:\Python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\install.py", line 563, in run
self.run_command('build')
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Python27\lib\distutils\command\build.py", line 127, in run
self.run_command(cmd_name)
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Joe\Desktop\pycrypto-2.6\setup.py", line 251, in run
self.run_command(cmd_name)
File "C:\Python27\lib\distutils\cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "C:\Python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "C:\Users\Joe\Desktop\pycrypto-2.6\setup.py", line 278, in run
raise RuntimeError("autoconf error")
RuntimeError: autoconf error
I've also tried install pycrypto using the prebuilt binaries for windows from www.voidspace.org.uk
Upvotes: 2
Views: 9351
Reputation: 169364
The vcvarsall.bat
file contains instructions for choosing the appropriate Microsoft C compiler for your machine. Since you do not have that file you have correctly attempted to install and use another compiler, MinGW.
The only step you are missing is to add the location of the MinGW compiler to your PATH environment variable. Please see the accepted answer to the following question for detailed instructions: How do I add the MinGW bin directory to my system path?
Upvotes: 1