M BUZZ CRAZE NEWS
// news

import tensorflow as tf Segmentation fault (core dumped) in Ubuntu 20.04

By Sarah Rodriguez

I need to install tensorflow 1.14 for DeepLabCut and I got a segmentation fault. How do I fix it? I also prefer to install the GPU version. Not sure if this is the most standard way of installing it.

(base) mona@mona:~$ conda install -c conda-forge tensorflow=1.14
Collecting package metadata (current_repodata.json): done
Solving environment: done
## Package Plan ## environment location: /home/mona/anaconda3 added / updated specs: - tensorflow=1.14
The following packages will be downloaded: package | build ---------------------------|----------------- absl-py-0.9.0 | py37hc8dfbb8_1 162 KB conda-forge astor-0.8.1 | pyh9f0ad1d_0 25 KB conda-forge c-ares-1.15.0 | h516909a_1001 100 KB conda-forge ca-certificates-2020.6.20 | hecda079_0 145 KB conda-forge certifi-2020.6.20 | py37hc8dfbb8_0 151 KB conda-forge conda-4.8.3 | py37hc8dfbb8_1 3.0 MB conda-forge curl-7.71.1 | he644dc0_3 140 KB conda-forge gast-0.3.3 | py_0 12 KB conda-forge google-pasta-0.2.0 | pyh8c360ce_0 42 KB conda-forge grpcio-1.30.0 | py37hb0870dc_0 2.0 MB conda-forge importlib-metadata-1.7.0 | py37hc8dfbb8_0 44 KB conda-forge keras-applications-1.0.8 | py_1 30 KB conda-forge keras-preprocessing-1.1.0 | py_0 33 KB conda-forge libcurl-7.71.1 | hcdd3856_3 302 KB conda-forge libprotobuf-3.12.3 | h8b12597_2 2.3 MB conda-forge libssh2-1.9.0 | hab1572f_4 225 KB conda-forge markdown-3.2.2 | py_0 61 KB conda-forge openssl-1.1.1g | h516909a_0 2.1 MB conda-forge protobuf-3.12.3 | py37h3340039_0 702 KB conda-forge python_abi-3.7 | 1_cp37m 4 KB conda-forge tensorboard-1.14.0 | py37_0 3.2 MB conda-forge tensorflow-1.14.0 | h4531e10_0 23 KB conda-forge tensorflow-base-1.14.0 | py37h4531e10_0 87.6 MB conda-forge tensorflow-estimator-1.14.0| py37h5ca1d4c_0 645 KB conda-forge termcolor-1.1.0 | py_2 6 KB conda-forge ------------------------------------------------------------ Total: 103.1 MB
The following NEW packages will be INSTALLED: absl-py conda-forge/linux-64::absl-py-0.9.0-py37hc8dfbb8_1 astor conda-forge/noarch::astor-0.8.1-pyh9f0ad1d_0 c-ares conda-forge/linux-64::c-ares-1.15.0-h516909a_1001 gast conda-forge/noarch::gast-0.3.3-py_0 google-pasta conda-forge/noarch::google-pasta-0.2.0-pyh8c360ce_0 grpcio conda-forge/linux-64::grpcio-1.30.0-py37hb0870dc_0 importlib-metadata conda-forge/linux-64::importlib-metadata-1.7.0-py37hc8dfbb8_0 keras-applications conda-forge/noarch::keras-applications-1.0.8-py_1 keras-preprocessi~ conda-forge/noarch::keras-preprocessing-1.1.0-py_0 libprotobuf conda-forge/linux-64::libprotobuf-3.12.3-h8b12597_2 markdown conda-forge/noarch::markdown-3.2.2-py_0 protobuf conda-forge/linux-64::protobuf-3.12.3-py37h3340039_0 python_abi conda-forge/linux-64::python_abi-3.7-1_cp37m tensorboard conda-forge/linux-64::tensorboard-1.14.0-py37_0 tensorflow conda-forge/linux-64::tensorflow-1.14.0-h4531e10_0 tensorflow-base conda-forge/linux-64::tensorflow-base-1.14.0-py37h4531e10_0 tensorflow-estima~ conda-forge/linux-64::tensorflow-estimator-1.14.0-py37h5ca1d4c_0 termcolor conda-forge/noarch::termcolor-1.1.0-py_2
The following packages will be UPDATED: conda pkgs/main::conda-4.8.3-py37_0 --> conda-forge::conda-4.8.3-py37hc8dfbb8_1 curl pkgs/main::curl-7.68.0-hbc83047_0 --> conda-forge::curl-7.71.1-he644dc0_3 libcurl pkgs/main::libcurl-7.68.0-h20c2e04_0 --> conda-forge::libcurl-7.71.1-hcdd3856_3 libssh2 pkgs/main::libssh2-1.8.2-h1ba5d50_0 --> conda-forge::libssh2-1.9.0-hab1572f_4
The following packages will be SUPERSEDED by a higher-priority channel: ca-certificates pkgs/main::ca-certificates-2020.6.24-0 --> conda-forge::ca-certificates-2020.6.20-hecda079_0 certifi pkgs/main::certifi-2020.6.20-py37_0 --> conda-forge::certifi-2020.6.20-py37hc8dfbb8_0 openssl pkgs/main::openssl-1.1.1g-h7b6447c_0 --> conda-forge::openssl-1.1.1g-h516909a_0
Proceed ([y]/n)? y
Downloading and Extracting Packages
keras-applications-1 | 30 KB | ########################################################################## | 100%
conda-4.8.3 | 3.0 MB | ########################################################################## | 100%
termcolor-1.1.0 | 6 KB | ########################################################################## | 100%
google-pasta-0.2.0 | 42 KB | ########################################################################## | 100%
tensorflow-base-1.14 | 87.6 MB | ########################################################################## | 100%
libprotobuf-3.12.3 | 2.3 MB | ########################################################################## | 100%
gast-0.3.3 | 12 KB | ########################################################################## | 100%
ca-certificates-2020 | 145 KB | ########################################################################## | 100%
tensorflow-estimator | 645 KB | ########################################################################## | 100%
libcurl-7.71.1 | 302 KB | ########################################################################## | 100%
absl-py-0.9.0 | 162 KB | ########################################################################## | 100%
curl-7.71.1 | 140 KB | ########################################################################## | 100%
markdown-3.2.2 | 61 KB | ########################################################################## | 100%
openssl-1.1.1g | 2.1 MB | ########################################################################## | 100%
tensorflow-1.14.0 | 23 KB | ########################################################################## | 100%
importlib-metadata-1 | 44 KB | ########################################################################## | 100%
python_abi-3.7 | 4 KB | ########################################################################## | 100%
protobuf-3.12.3 | 702 KB | ########################################################################## | 100%
libssh2-1.9.0 | 225 KB | ########################################################################## | 100%
tensorboard-1.14.0 | 3.2 MB | ########################################################################## | 100%
astor-0.8.1 | 25 KB | ########################################################################## | 100%
certifi-2020.6.20 | 151 KB | ########################################################################## | 100%
grpcio-1.30.0 | 2.0 MB | ########################################################################## | 100%
keras-preprocessing- | 33 KB | ########################################################################## | 100%
c-ares-1.15.0 | 100 KB | ########################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(base) mona@mona:~$ python
Python 3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Segmentation fault (core dumped)
(base) mona@mona:~$
(base) mona@mona:~$ python
Python 3.7.6 (default, Jan 8 2020, 19:59:22)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Segmentation fault (core dumped)

Some further information:

(base) mona@mona:~$ uname -a
Linux mona 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
(base) mona@mona:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
(base) mona@mona:~$ python -V
Python 3.7.6
(base) mona@mona:~$ which python
/home/mona/anaconda3/bin/python
(base) mona@mona:~$ nvcc -V
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Sun_Jul_28_19:07:16_PDT_2019
Cuda compilation tools, release 10.1, V10.1.243
(base) mona@mona:~$ nvidia-smi
Mon Jul 20 11:51:09 2020
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 440.100 Driver Version: 440.100 CUDA Version: 10.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 GeForce RTX 2070 Off | 00000000:01:00.0 Off | N/A |
| N/A 47C P8 9W / N/A | 642MiB / 7982MiB | 17% Default |
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 1313 G /usr/lib/xorg/Xorg 310MiB |
| 0 1759 G /usr/bin/gnome-shell 326MiB |
| 0 6030 G /usr/lib/firefox/firefox 2MiB |
+-----------------------------------------------------------------------------+
Reset to default

Know someone who can answer? Share a link to this question via email, Twitter, or Facebook.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy