5
  File "c:\users\user\appdata\local\temp\pip_build_user\ssdeep\.eggs\cff
i-1.8.2-py2.7-win32.egg\cffi\ffiplatform.py", line 65, in _build
    raise VerificationError('%s: %s' % (e.__class__.__name__, e))

cffi.ffiplatform.VerificationError: CompileError: command 'C:\\Users\\user\\
AppData\\Local\\Programs\\Common\\Microsoft\\Visual C++ for Python\\9.0\\VC\\Bin
\\cl.exe' failed with exit status 2

Cleaning up... Command python setup.py egg_info failed with error code 1 in c:\users\


I keep getting this error. I have tried multiple other solutions on here but no luck. Am I missing something. Thanks

1
  • What is the module that you are trying to install through pip? Commented Sep 11, 2016 at 14:03

1 Answer 1

3

A crude method worked for me. Perhaps someone with knowledge can optimize the answer:

  1. Read the following article Link
  2. Mine is Python 2.7. I followed the article and installed the Visual C++ compiler for python 2.7. Install Link
  3. This installs a folder in your "%AppData%\Local\Programs\Common\Microsoft".
  4. I copied the contents of
    • "...\Visual C++ for Python\9.0\VC\include"to the "C:\Python27\include"
    • "...\Visual C++ for Python\9.0\VC\lib"to "C:\Python27\libs"
    • "...\Visual C++ for Python\9.0\WinSDK\Include" to "C:\Python27\include"
    • "...\Visual C++ for Python\9.0\WinSDK\lib" to "C:\Python27\libs"
  5. I edited path in environmental variables to include these two directories ("C:\Python27\include" and "C:\Python27\libs". I think this step is not essential).
  6. Edit the "msvc9compiler.py" in the directory "C:\Python27\Lib\distutils"
    • Line # ~270 hard coded link to "vcvarsall.bat" "%appdata%..\Visual C++ for Python\9.0\vcvarsall.bat"
    • Line # ~394 os.environ['include'] = "C:\\Python27\\include"
    • Line # ~396 os.environ['lib'] = "C:\\Python27\\libs"
    • Line # ~402 hard coded the link to self.cc = "...\Visual C++ for Python\9.0\VC\Bin\cl.exe" (caution: it is \Bin and not \bin.)
    • Line # ~403 Similar to above hard coded the link to self.linker.

Doing the above steps worked for me.

Sign up to request clarification or add additional context in comments.

3 Comments

Step 4) I edited path in environmental variables to include these directories. Step 5) Edit the msvc9compiler.py in the directory C:\Python27\Lib\distutils Line # ~270 hard coded link to vcvarsall.bat "%appdata%\..\Visual C++ for Python\9.0\vcvarsall.bat" Line # ~394 os.environ['include'] = "C:\Python27\include" Line # ~396 os.environ['lib'] = "C:\\Python27\\libs" Line # ~402 hard coded the link to self.cc = "...\Visual C++ for Python\9.0\VC\Bin\cl.exe" (caution: it is \Bin and not \bin.) Line # ~403 hard coded the link to self.linker. Doing the above steps worked for me.
Hi, I'm trying to apply your solution but I stopped in step 6. can you please explain more about the changes in Line 270? I could not found the exact location to update the path.
To Sakurami, I just saw your message. Have you found the solution? If not, the line # 270 is expecting path for vcvarsall.bat. Instead, I hardcoded the path. If this explanation doesn't help, post the particular lines in your file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.