0

I work under Ubuntu 22.04 installed on a Virtual Machine. Recently, I used pip3 install tensorflow to install TensorFlow. I got the following error:

$ python3

Python 3.8.17 | packaged by conda-forge | (default, Jun 16 2023, 07:06:00) 

[GCC 11.4.0] on linux

Type "help", "copyright", "credits" or "license" for more information.

>>> import tensorflow as tf

Illegal instruction (core dumped)

I have tried a lot of solutions like here but all in vain.

Any suggestions?

desertnaut
  • 57,590
  • 26
  • 140
  • 166
Bekaso
  • 135
  • 5

1 Answers1

2

I assume you may have an old anaconda installation, so try and update it:

  • conda update --all

If possible download install latest anaconda that uses 3.10.3

Then install tensorflow:

  • conda install -c conda-forge tensorflow

I recommend creating a virtual environment after update:

  • conda create -n <myenvname> -c conda-forge python=3.8.17 tensorflow
MortenB
  • 2,749
  • 1
  • 31
  • 35