Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

1.6K
Vistas
Illegal instruction(core dumped) tensorflow

I am importing tensorflow in my ubuntu python using following commands-

$ python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Illegal instruction (core dumped)

And the program exits. Please specify the solution.

over 4 years ago · Santiago Trujillo
3 Respuestas
Responde la pregunta

0

I had the same problem and had to downgrade tensorflow to 1.5.0:

pip uninstall tensorflow
pip install tensorflow==1.5.0

Edit: As @Tobsta points out in the comments, the other option is to compile the binaries from source. The precompiled binaries of versions >1.5 use AVX instructions that are not supported by older CPUs

over 4 years ago · Santiago Trujillo Denunciar

0

The desired version of TensorFlow can be installed via a hack using anaconda. First, go to the directory which has sufficient space and download anaconda there (Check the version you want to install).

curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh

If you want to ensure the integrity of the Anaconda installed check it using SHA-256.

sha256sum Anaconda3-2019.03-Linux-x86_64.sh

Run the Anaconda Script:

bash Anaconda3-2019.03-Linux-x86_64.sh

Output should be like:

45c851b7497cc14d5ca060064394569f724b67d9b5f98a926ed49b834a6bb73a  Anaconda3-2019.03-Linux-x86_64.sh

Now when you get the prompt: Anaconda3 will be installed in this location: ….

Enter the location where you want it to be installed or press enter to continue.

Now as per your choice/requirement you can type yes/no for “Do you wish the installer to initialize Anaconda3 by running conda init?”

Now instead of using pip for installing tensorflow, we will use conda but for this we will have to first set the path using the vim ~/.bashrc file.

# added by Anaconda3 installer
export PATH="/anaconda3/bin:$PATH"

Put your own path instead of /anaconda3/bin, like: /data/anaconda3/bin, or whatsoever.

To make this effective, run:

source ~/.bashrc

Now create a virtual environment.

conda create -n tf_env
source /anaconda3/bin/activate tf_env

Now to install TensorFlow or Keras, run:

conda install tensorflow
conda install keras

or, if there is a particular version that you want to install say, version 1.14.0 for TensorFlow and 2.3.1 for Keras.

conda install tensorflow==1.14.0
conda install keras==2.3.1

You have to be in the same virtual environment as while installing Keras and/or TensorFlow for it to work properly. Tn this case tf_env by running source /anaconda3/bin/activate tf_env

You can check the installation by running

$ python3 -c "import tensorflow as tf; print(tf.__version__)"
1.14.0
over 4 years ago · Santiago Trujillo Denunciar

0

I see same message on my PC / Celeron N4000.

$ python3 -c "import tensorflow as tf; print(tf.__version__)"
Illegal instruction (core dumped)

I successed to build TensorFlow v1.14.0 without AVX instruction. (Just build TensorFlow on CeleronN4000)

$ python3 -c "import tensorflow as tf; print(tf.__version__)"
1.14.0

I wrote the log on below.
https://github.com/naruai/wiki/blob/master/TensorFlow/BuildTensorFlowWOAVX.md

In my case, used Python 3.6.8 .
I also tested with Python 2.7 .
About Python 3.5 , I not tested.
Maybe possible to use similar way, I think.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda