tensorflow: Exit code 132 on TensorFlow import

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Arch Linux 4.15.8
  • TensorFlow installed from (source or binary): Binary wheel (pip install tensorflow)
  • TensorFlow version (use command below): 1.7.0
  • Python version: 3.6
  • Bazel version (if compiling from source): N/A
  • GCC/Compiler version (if compiling from source): N/A
  • CUDA/cuDNN version: N/A
  • GPU model and memory: Intel graphics, 4GB RAM
  • Exact command to reproduce: import tensorflow

Describe the problem

I’ve installed tensorflow v1.7.0 via PIP and I am having issues working with it. Upon entering a REPL and attempting to import tensorflow the REPL silently exits with an exit code of 132. I’ve run PDB and tried importing it and it appears it is exiting around the from tensorflow.python import * section of the tensorflow code. Looking at the PDB output it appears that code is exiting with error code 132 after running importlib._bootstrap._find_and_load which is a python internal.

Source code / logs

PDB output from trying to import tensorflow (around the section that it exits):

> <frozen importlib._bootstrap>(191)_get_module_lock()->_ModuleLock('...40427194539368
(Pdb) n
> <frozen importlib._bootstrap>(149)__enter__()
(Pdb) n
--Return--
> <frozen importlib._bootstrap>(149)__enter__()->None
(Pdb) n
> <frozen importlib._bootstrap>(969)_find_and_load()
(Pdb) n
> <frozen importlib._bootstrap>(970)_find_and_load()
(Pdb) n
> <frozen importlib._bootstrap>(971)_find_and_load()
(Pdb) n

What I’m trying to run:

$ python3.6
Python 3.6.4 (default, Jan  5 2018, 02:35:40) 
[GCC 7.2.1 20171224] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
$ echo $?
132

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 3
  • Comments: 23 (14 by maintainers)

Most upvoted comments

Is it possible you are running on an old CPU? TensorFlow prebuilt packages require your CPU to have AVX instruction set. What is your CPU make and model?

This CPU definitely does not have AVX instruction set. So that is one issue. Which command did you use to build TF on your machine? Also, how did you configure?