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

Windows系统Anaconda(Python2.7)安装TensorFlow时conda install失败求助

Fixing TensorFlow Installation Error on Anaconda2 (Python 2.7) Windows

Hey there, let's break down why you're hitting that error when running conda install tensorflow, and walk through the solutions.

Why This Happens

The core issue here is that Python 2.7 is no longer supported (it reached end-of-life in 2020), and TensorFlow dropped support for Python 2 entirely starting with version 2.0. Even the last Python 2-compatible TensorFlow release (1.15.x) hasn't been updated in years. On top of that, Anaconda2's default package sources have likely stopped hosting these outdated packages, so Conda can't resolve the environment dependencies properly—hence that "Solving environment" failure.

This is the only sustainable fix, since Python 2 is completely obsolete, and all modern TensorFlow development happens for Python 3. Here's how to do it:

  • Download and install Anaconda3 (pick a version with Python 3.8–3.10; these have the best compatibility with current TensorFlow releases).
  • Open Anaconda Prompt, create a fresh virtual environment (optional but great for avoiding dependency conflicts):
    conda create -n tf_env python=3.9
    conda activate tf_env
    
  • Install TensorFlow either via Conda or pip (pip is often more reliable for latest versions):
    # Conda install
    conda install tensorflow
    # Or pip install
    pip install tensorflow
    

If you absolutely must stick with Python 2.7 for legacy reasons, you can install the last TensorFlow version that supports it. Conda probably won't have this package anymore, so use pip instead:

  • First, update pip to the last version that supports Python 2.7:
    pip install pip==20.3.4
    
  • Install TensorFlow 1.15.0:
    pip install tensorflow==1.15.0
    
  • If you hit network issues, try using a domestic PyPI mirror by adding -i [mirror URL] to the pip command (common public mirrors are available for Python packages).
    ⚠️ Important Note: TensorFlow 1.15.x has no official support, security patches, or bug fixes. Use this only as a temporary workaround for old projects.

内容的提问来源于stack exchange,提问作者Pretty Ninà

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.25 08:16:01