Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.6K
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda