python-3.xgittensorflowanacondaamd-gpu

TensorFlow Importing error ( Using Anaconda)


I have installed anaconda in my system, Python version is (3.7), I want to install TensorFlow as well. Since "python3.7" needed in my system, I created a environment for TensorFlow (Using conda prompt) and installed "python 3.6". Installation and everything was fine, But now when i am importing TensorFlow, i am getting following error.

ImportError: DLL load failed: The specified module could not be found.
Failed to load the native Tensor-flow runtime.

System info():

  1. i5 HP Inspiron, AMD graphics

tried downloading DLL files and pasting in system folder. but not helping.
Other solutions I found are through CUDA, which are only applicable if Nvidia graphics available.


Solution

  • Could you please try out the following steps which worked fine for us.

    For Linux Machine:

    1)Create a virtual environment using the below command

    conda create -n env_tensor -c intel python=3.6
    

    2)Activate the environment

    source activate env_tensor
    

    3)Install tensorflow in the activated environment

    pip install tensorflow
    

    For Windows Machine

    1)Create a virtual environment using the below command

    conda create -n env_tensor python=3.6
    

    2)Activate the environment

    conda activate env_tensor
    

    3)Install tensorflow in the activated environment

    pip install tensorflow
    

    (Here "env_tensor" is the environment name.You can use any name instead).

    After executing the above steps please try to import tensorflow.