tensorflow
anaconda
installation
version-control
python

Force Anaconda to install tensorflow 1.14

ML System Design practice on Codemia

Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.

Practice ML system design

Introduction

Installing TensorFlow 1.14 with Anaconda requires creating an isolated environment with Python 3.7, the last Python version fully supported by TF 1.14. The standard conda install may not find this version in the default channels, so you may need to use pip inside the conda environment or specify the conda-forge channel. TF 1.14 also requires CUDA 10.0 and cuDNN 7.4 for GPU support.

Create a Dedicated Conda Environment

bash
1# Create environment with Python 3.7
2conda create -n tf114 python=3.7 -y
3conda activate tf114
4
5# Verify Python version
6python --version
7# Python 3.7.x

TensorFlow 1.14 is compatible with Python 3.5, 3.6, and 3.7. Python 3.8+ is not supported.

Install TensorFlow 1.14

bash
1# CPU-only
2pip install tensorflow==1.14.0
3
4# GPU version
5pip install tensorflow-gpu==1.14.0
6
7# Verify installation
8python -c "import tensorflow as tf; print(tf.__version__)"
9# 1.14.0

Method 2: conda

bash
1# From default channel (may not have 1.14)
2conda install tensorflow=1.14.0
3
4# From conda-forge
5conda install -c conda-forge tensorflow=1.14.0
6
7# GPU version
8conda install -c conda-forge tensorflow-gpu=1.14.0

If conda cannot resolve the version, fall back to pip inside the conda environment.

GPU Requirements (CUDA/cuDNN)

TensorFlow 1.14 requires specific CUDA and cuDNN versions:

ComponentRequired Version
CUDA Toolkit10.0
cuDNN7.4+ (7.6 recommended)
NVIDIA Driver410.x+
Python3.5, 3.6, or 3.7
bash
1# Install CUDA 10.0 via conda (handles driver compatibility)
2conda install cudatoolkit=10.0 cudnn=7.6 -c conda-forge
3
4# Or install system-wide CUDA and cuDNN from NVIDIA
5# Check current CUDA version
6nvcc --version
7nvidia-smi

Verify GPU Detection

python
1import tensorflow as tf
2
3# Check TF version
4print(tf.__version__)  # 1.14.0
5
6# Check GPU availability
7print(tf.test.is_gpu_available())  # True if GPU is detected
8
9# List physical devices
10from tensorflow.python.client import device_lib
11devices = device_lib.list_local_devices()
12for d in devices:
13    print(f"{d.name} ({d.device_type})")
14# /device:CPU:0 (CPU)
15# /device:GPU:0 (GPU)

Handling Dependency Conflicts

bash
1# If pip install fails with dependency conflicts, force the version
2pip install tensorflow==1.14.0 --no-deps
3
4# Then install dependencies manually
5pip install numpy==1.16.4 protobuf==3.7.1 grpcio==1.24.0
6
7# Or pin compatible versions
8pip install "numpy<1.17" "protobuf<3.20" tensorflow==1.14.0

Common dependency issues:

bash
1# NumPy version too high
2# ERROR: tensorflow 1.14.0 requires numpy<2.0,>=1.14.5
3pip install "numpy>=1.14.5,<1.17"
4
5# h5py version conflict
6pip install "h5py<3.0"
7
8# gast version conflict
9pip install "gast==0.2.2"

Freezing the Environment

bash
1# Export for reproducibility
2conda env export > tf114_environment.yml
3pip freeze > requirements.txt
4
5# Recreate on another machine
6conda env create -f tf114_environment.yml
7# Or
8conda create -n tf114 python=3.7 -y && conda activate tf114 && pip install -r requirements.txt

Running a Quick Test

python
1import tensorflow as tf
2
3# TF 1.x style
4hello = tf.constant("Hello, TensorFlow 1.14!")
5with tf.Session() as sess:
6    print(sess.run(hello))
7    # b'Hello, TensorFlow 1.14!'
8
9# Simple computation
10a = tf.constant(2.0)
11b = tf.constant(3.0)
12with tf.Session() as sess:
13    print(sess.run(a + b))  # 5.0

Migrating to TF2 (Future Path)

TensorFlow 1.14 is no longer maintained. If you are locked into it for a legacy project, consider gradual migration:

python
1# TF 1.14 includes a TF2 compatibility module
2import tensorflow.compat.v2 as tf
3tf.enable_v2_behavior()
4
5# Or run TF2 with TF1 compatibility
6import tensorflow.compat.v1 as tf
7tf.disable_eager_execution()

Common Pitfalls

  • Using Python 3.8+: TensorFlow 1.14 does not support Python 3.8 or later. Attempting to install it results in "no matching distribution found." Always use Python 3.7 or below.
  • CUDA version mismatch: TF 1.14 requires CUDA 10.0 exactly. CUDA 10.1, 10.2, or 11.x are not compatible and cause ImportError: libcublas.so.10.0: cannot open shared object file. Install CUDA 10.0 specifically.
  • Mixing pip and conda installs: Installing TensorFlow with pip and CUDA with conda can cause library path conflicts. Either use pip for everything or conda for everything within the same environment.
  • Deprecated numpy functions: Newer NumPy versions (1.24+) removed functions that TF 1.14 uses internally (like np.bool, np.int). Pin NumPy to <1.17 to avoid AttributeError at import time.
  • Not isolating the environment: Installing TF 1.14 in your base conda environment can break other projects. Always create a dedicated environment with conda create -n tf114 python=3.7.

Summary

  • Create an isolated conda environment with Python 3.7: conda create -n tf114 python=3.7
  • Install with pip install tensorflow==1.14.0 (or tensorflow-gpu==1.14.0 for GPU)
  • GPU support requires CUDA 10.0 and cuDNN 7.4+ — no other CUDA versions work
  • Pin NumPy to <1.17 and h5py to <3.0 to avoid dependency conflicts
  • Verify with tf.test.is_gpu_available() for GPU detection
  • TF 1.14 is end-of-life — plan migration to TF2 using the tensorflow.compat.v1 module

Related reading
Free course
Beginner
7 lessons
2 hours
Tackling System Design Interview Problems

A short course that equips you with the skills to approach system design interviews methodically.

Start the free course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

ML System Design practice on Codemia

Design recommenders, ranking systems and training pipelines the way ML interviews actually ask for them, with worked solutions.

Practice ML system design

All Rights Reserved.