1

updated code to work with tensorflow 2.4 to get around issue

I'm trying to install Tensorflow 1.9 on a Raspberry Pi as it is a requirement of the code I want to run. It installs fine on my Macbook using pip install tensorflow==1.9.0, but on the Pi I get the error:

Could not find a version that satisfies the requirement tensorflow==1.9.0 (from versions: 0.11.0, 1.11.0, 1.12.0, 1.13.1, 1.14.0)
No matching distribution found for tensorflow==1.9.0

I'm using a Conda (miniconda3) environment with Python 3.6.

Would using Ubuntu Desktop instead of Raspberry Pi OS work maybe? Or is there perhaps a way to build it from https://github.com/tensorflow/tensorflow/tree/r1.9?

jzy
  • 31
  • 4

2 Answers2

0

You need to install python version 3.6 or other compatible versions in conda. Tensorflow does not work on versions higher than 3.8 and has identified issues with some other versions. I recommend using python 3.6 through conda. You will also probably need to move the

  • libcrypto-1_1-x64.dll
  • libssl-1_1-x64.dll files from anaconda3\Library\bin to anaconda3/DLLs. You can find more details about this issue if you run into it here.

Hope this answers your question!

Mason Choi
  • 101
  • 2
  • 12
0

To install Tensorflow on Raspberry Pi run:

sudo apt install libatlas-base-dev

and then

pip3 install tensorflow

You can also compilte TensorflowLite and use if you wish. The compile TensorflowLite on RPi refer this link

AKD
  • 68
  • 10
  • this installs tensorflow 1.14 which isn't the version I needed, but I went with 2.4.0 in the end, easier to adjust for compatibilty – jzy Mar 02 '21 at 11:12
  • Oh ok, no probs. Sorry if caused any problems. But there was no problem with this fundamentally right? – AKD Mar 02 '21 at 13:59