2

I have already install python(x,y)2.7.6.1 in Windows7 64bit

and try to install a package "imreg" (from here)

python setup.py install

I am getting this error:

no module named msvccompiler in numpy.distutils trying from distutils customize msvccompiler

I have installed visual studio 2008 and Microsoft Visual C++ Compiler for Python 2.7(from here)

but I don't know how to solve this problem

user2775128
  • 309
  • 1
  • 4
  • 14
  • possible duplicate of [Testing Scipy; get "No module named msvccompiler in numpy.distutils; trying from distutils"](http://stackoverflow.com/questions/13619649/testing-scipy-get-no-module-named-msvccompiler-in-numpy-distutils-trying-from) - have you tried running from a VS command prompt? – stijn Dec 04 '14 at 08:32
  • According to the link for "imreg", you also need NumPy >= 1.5, SciPy >= 0.9, and py.test >= 2.0 installed. – martineau Dec 04 '14 at 09:37
  • I have tried the way "set VS90COMNTOOLS=%VS__110__COMNTOOLS%",but I still got the same problem.I am sure the version of NumPy >= 1.5, SciPy >= 0.9, and py.test >= 2.0 have been installed. – user2775128 Dec 05 '14 at 06:08

1 Answers1

2

I solved this question by this way:

MinGW with C++ Compiler installed.

in " C:\Python27\Lib\distutils" create a file "distutils.cfg" and add these lines:

[build]

compiler=mingw32

the answer is from How to use MinGW's gcc compiler when installing Python package using Pip?

Community
  • 1
  • 1
user2775128
  • 309
  • 1
  • 4
  • 14