I'm having trouble installing a specific version of tensorflow-gpu for reproducing someone else's code

I’m working on a project where I have to detect when a person is in certain stages of sleep by looking at EEG data. I’m working on a 2014 macbook pro using zsh and a python=3.6 miniconda environment. I want to use the code from this repo:

The requirements are:


As per the instructions on github, I set up a conda environment and install the required libraries:

conda create -n tinysleepnet python=3.6
conda activate tinysleepnet
pip install -r requirements.txt

But I get an error attempting to install tensorflow-gpu:

ERROR: Could not find a version that satisfies the requirement tensorflow-gpu==1.13.1 (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0)

ERROR: No matching distribution found for tensorflow-gpu==1.13.1

So I installed it by:

pip install --upgrade tensorflow-gpu

which successfully installed tensorflow-gpu-1.1.0-cp36-cp36m-macosx_10_11_x86_64.whl

It is able to successfully prepare the data, but when I run the training program, I get a couple of errors that the “image not found” and “Failed to load the native TensorFlow runtime.” I can include the entire error message, if needed.

I feel like the error could be related to not having the specific version of tensorflow-gpu required by the repo, but I don’t know why it can’t find that version to install it.

Thanks for reading this far

That TF version is very old and EOL

You could try to open a ticket in that repository or try to adapt the code for an updated TF version.

Hi @nip2 :wave:

Instead of conda, have you tried pip (PiPy)?

For example, running this in Colab:

!pip install tensorflow-gpu==1.13.1

should install the right version for you.

Collecting tensorflow-gpu==1.13.1

Downloading tensorflow_gpu-1.13.1-cp37-cp37m-manylinux1_x86_64.whl (345.0 MB)


Successfully installed keras-applications-1.0.8 mock-4.0.3 tensorboard-1.13.1 tensorflow-estimator-1.13.0 tensorflow-gpu-1.13.1

fyi TensorFlow Releases v1.13.1: Release TensorFlow 1.13.1 · tensorflow/tensorflow · GitHub with source code links at the bottom of the page.

PiPy appears to have the TF v1.13.1 version (non-GPU) which may work on your macOS:

tensorflow: tensorflow · PyPI :


However, the tensorflow-gpu page doesn’t appear to have a wheel available for macOS: tensorflow-gpu: tensorflow-gpu · PyPI (this may have to do with NVIDIA GPUs and Macs: Suporte a GPUs  |  TensorFlow).

There is a lot of churn in the Tensorflow APIs. Bringing up very old code is often painful.

You might find it easier to install matching version if you do this in Google Colab instead of on your own Mac.