"error: Unable to find vcvarsall.bat" when installing Fabric (Python library) on Windows [duplicate]

StackOverflow https://stackoverflow.com/questions/21829188

  •  12-10-2022
  •  | 
  •  

I tried installing Fabric in my Windows 7 64-bit machine and all I got was this lousy error message:

building 'Crypto.Random.OSRNG.winrandom' extension

warning: GMP or MPIR library not found; Not building Crypto.PublicKey._fastmath.

error: Unable to find vcvarsall.bat

None of the answers in this similar question error: Unable to find vcvarsall.bat worked for me. What to do?

有帮助吗?

解决方案

I believe the root cause is as described here:

Some Windows users whose Python is 64-bit have found that the PyCrypto dependency winrandom may not install properly, leading to ImportErrors. In this scenario, you’ll probably need to compile winrandom yourself via e.g. MS Visual Studio. See #194 for info.

I've been able to resolve the issue by downloading and installing a PyCrypto binary from Michael Foord's website and then re-installing Fabric. Many thanks Michael!

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top