I´m trying to make my first try with Tensorflow using windows 8.1 and Pycharm but I get an Tensorflow error.
I also installed everything in a virtual env with pip and runned the code in the command line with the same result.
Some things I tried
I read other posts relating the issue to the
msvcp140.dlland I do have the C++ distributable installed.Also found info related to downgrading to python 3.5. I actually use Python 3.7 and wouldn´t like to downgrade. I´m worried other apps won´t work. Can anyone confirm it won´t work with Python greater than 3.5?
Also read info about using Conda, but a the same time other info saying to avoid it, naming pip as the officialy supported method.
Also found info about my Intel® Pentium® Processor B980 not supporting AVX instructions. Is this a must when using CPU or only when using the GPU?
Any clues? Thanks in advance!
The following is the error message I get:
Using TensorFlow backend. Traceback (most recent call last): File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: No se puede encontrar el módulo especificado.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:/Users/Lia love/TestAi/Test1.py", line 4, in from keras.models import Sequential File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\keras__init__.py", line 3, in from . import utils File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\utils__init__.py", line 6, in from . import conv_utils File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\utils\conv_utils.py", line 9, in from .. import backend as K File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend__init__.py", line 89, in from .tensorflow_backend import * File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\keras\backend\tensorflow_backend.py", line 5, in import tensorflow as tf File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow__init__.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "C:\Users\Lia love\AppData\Local\Programs\Python\Python37\lib\imp.py", line 343, in load_dynamic return _load(spec) ImportError: DLL load failed: No se puede encontrar el módulo especificado.
Failed to load the native TensorFlow runtime.
Test code
I estimate this is not a problem about my code, but I include it just in case.
import pandas as pd
from sklearn import preprocessing
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Dense
df = pd.read_csv("housepricedata.csv")
dataset = df.values
X = dataset[:, 0:10]
Y = dataset[:, 10]
min_max_scaler = preprocessing.MinMaxScaler()
X_scale = min_max_scaler.fit_transform(X)
X_train, X_val_and_test, Y_train, Y_val_and_test = train_test_split(X_scale, Y, test_size=0.3)
X_val, X_test, Y_val, Y_test = train_test_split(X_val_and_test, Y_val_and_test, test_size=0.5)
print("Keras model setup")
model = Sequential([
Dense(32, activation='relu', input_shape=(10,)),
Dense(32, activation='relu'),
Dense(1, activation='sigmoid'),
])
python -c "import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))"? You could try using 32-bit python if you're using 64-bit. Or building Tensorflow from source. - pnovotnyq