You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows10+Python3.6安装TensorFlow后导入失败问题求助

Fixing TensorFlow Import Issues on Windows 10 with Python 3.6.0

Hey there, let's work through your TensorFlow import problems step by step—you’ve already tried a few troubleshooting steps, so let’s zero in on the root causes here.

1. Fix the "ModuleNotFoundError" First: Align Python and Pip Environments

The first error where pip list shows TensorFlow installed but Python can’t find it almost always boils down to a mismatch between the pip/pip3 you used to install packages and the python interpreter you’re launching. Here’s how to fix it:

  • First, check which Python you’re running:
    where python
    
    Make sure the output points to C:\Users\a\AppData\Local\Programs\Python\Python36\python.exe (your 64-bit Python 3.6.0).
  • Next, check your pip3 path:
    where pip3
    
    It should be in the same installation’s Scripts folder, like C:\Users\a\AppData\Local\Programs\Python\Python36\Scripts\pip3.exe.

If the paths don’t match, you have multiple Python versions or misconfigured environment variables. Fix this by:

  • Using the full path to your Python 3.6.0’s pip3 for installations:
    C:\Users\a\AppData\Local\Programs\Python\Python36\Scripts\pip3 install tensorflow==1.12.0
    
  • Or, move your Python 3.6.0 installation path and its Scripts folder to the top of your system PATH environment variable, so Windows uses this version first.

2. Resolve the Protobuf DLL Error for TensorFlow 1.10

The ImportError: DLL load failed with Protobuf happens because TensorFlow 1.10 has strict version compatibility requirements with Protobuf, or you’re missing critical Visual C++ runtime libraries. Try these solutions in order:

Option 1: Install a Protobuf Version Compatible with TensorFlow 1.10

TensorFlow 1.10 works best with Protobuf 3.6.1—your current Protobuf version is likely too new or too old. Uninstall the existing version and install the compatible one:

pip3 uninstall protobuf -y
pip3 install protobuf==3.6.1

After this, try importing TensorFlow again.

Option 2: Install Required Visual C++ Redistributables

Python 3.6.0 is compiled with MSC v.1900, so it needs the 64-bit version of Visual C++ Redistributable for Visual Studio 2015-2019. Install this runtime library, restart your computer, and then test TensorFlow import again.

Option 3: Upgrade Python 3.6.0 to a Newer Patch Version

Python 3.6.0 is an early release with known compatibility bugs. Upgrade to Python 3.6.15 (the final stable release of the Python 3.6 series) — this fixes many DLL and environment-related issues. After upgrading, reinstall TensorFlow 1.12.0 or 1.10.0.

3. Verify Your Fix

Once you’ve tried the above steps, run this command to confirm TensorFlow is working:

python -c "import tensorflow as tf; print(tf.__version__)"

If it prints the TensorFlow version without errors, you’re good to go!


内容的提问来源于stack exchange,提问作者foxnico

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.11 08:57:03