Importing tensorflow makes python 3.6.5 error
I have solved the issue. The following procedure was used to find and fix the problem:
I used the faulthandler
module to force python to print out a stack trace and recieved a Windows fatal exception: access violation
error which seems to suggest the problem was indeed a segfault caused by some module used by tensorflow.
I tried to fix dependencies by doing a conda update --all
and then a conda clean --all
which didn't fix the problem.
I noticed though that the problems seems to arise from the h5py
and keras
modules so I did pip install --upgrade h5py
and pip install --upgrade keras
and pip install --upgrade tensorflow
and the problem was fixed. I am now using tensorflow version 1.12.0
, keras version 2.2.4
, and h5py version 2.8.0
.
The key to solving this problem seems to be the faulthander
module which showed me which modules (h5py and keras) were leading to the segfault.