Python3.6安装TensorFlow遇wrapt编译Wheel错误,求简易解决方法
Hey there, let's sort out that annoying wrapt build error you're running into. Here are a couple of quick, straightforward fixes that should get you past this:
Install a pre-compiled wrapt wheel first
The error pops up because pip is trying to compile wrapt from source (which requires a C build environment on Windows that you might not have set up). Instead, grab a pre-built version first with this command:pip install wrapt==1.11.2 --only-binary :all:Once that's done, run your original TensorFlow install command again:
pip install tensorflow --no-cache-dirVersion 1.11.2 is fully compatible with TensorFlow 2.1.0, so this should play nicely without any compilation hiccups.
Upgrade pip first
Older versions of pip sometimes struggle to find or use pre-compiled wheels properly. Update pip to the latest version with:python -m pip install --upgrade pipThen try installing TensorFlow again—this might let pip automatically grab the pre-built wrapt package on its own, no extra steps needed.
If those don't work, the last resort is installing the Visual C++ Build Tools (make sure to select the "Desktop development with C++" workload during setup), but that's a bit more involved. The first two fixes should cover most cases though!
内容的提问来源于stack exchange,提问作者Dangatang




