Installing TensorFlow, Keras, and Python in Windows

Video is ready, Click Here to View ×


Updated version:

You can find the instructions here (from the video):

Please subscribe and comment!

Follow me:

YouTube:
Twitter:
GitHub:

38 Comments

  1. Thanks for making so helpful video. I am getting this error while using Tensorflow: "Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2" in Window 10 machine

  2. Google/Miniconda always throw me one curve ball a semester! ๐Ÿ™‚ I believe I've found the source of an issue that many of you seem to have been
    running into lately. The issue that I noticed working with a student last night is that TensorFlow does not work with Python 3.7 (currently, Jan 2019). Previously, Miniconda had 3.6 as the default download. At some point, they moved this forward to 3.6.

    I tried out several install techniques and I believe the easiest method is to install Miniconda Python 3.7 and then create a 3.6 environment (inside of Miniconda 3.7) for Tensorflow. I use this technique often, when I have multiple versions that do not play nicely together. Python lets you create multiple environments that can each have completely different versions installed.

    I updated module 1 to have instructions on how to do this. Refer to this link:

    https://github.com/jeffheaton/t81_558_deep_learning/blob/master/t81_558_class01_intro_python.ipynb (Links to an external site.)Links to an external site.

  3. while using (pip install sklearn) anacondaprompt is showing this
    Requirement already satisfied: sklearn in d:anacondalibsite-packages (0.0)

    Requirement already satisfied: scikit-learn in d:anacondalibsite-packages (from sklearn) (0.19.2)

    twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.

    You are using pip version 10.0.1, however version 18.1 is available.

    You should consider upgrading via the 'python -m pip install –upgrade pip' command.)
    and show statement ( File "D:ANACONDAlibrunpy.py", line 193, in _run_module_as_main

    "__main__", mod_spec)

    File "D:ANACONDAlibrunpy.py", line 85, in _run_code

    exec(code, run_globals)

    File "D:ANACONDAlibsite-packagespip__main__.py", line 16, in <module>

    from pip._internal import main as _main # noqa

    File "D:ANACONDAlibsite-packagespip_internal__init__.py", line 5, in <module>

    import logging

    File "D:ANACONDAliblogging__init__.py", line 40, in <module>

    import threading

    File "C:UsersGOOD LUCKthreading.py", line 2, in <module>

    class m(threading.Thread):

    AttributeError: module 'threading' has no attribute 'Thread') after using command (python -m pip install –upgrade pip)

  4. Thanks Jeff . I had been struggling with tensorflow installation for sometime now. This was easy.
    For the complete installation I had to use python 3.6.7
    Also it would be great if you could also guide on how to the tensorflow installation for GPU

  5. i can't install tensorflow and every time i got this error >>> Could not find a version that satisfies the requirement tensorlow==1.2.1 (from versions: )

    No matching distribution found for tensorflow==1.2.1

  6. Thank you so so Good Doctor
    please help to solve this problem…
    >pip install tensorflow==1.2.1

    Collecting tensorflow==1.2.1

    Could not find a version that satisfies the requirement tensorflow==1.2.1 (from versions: )

    No matching distribution found for tensorflow==1.2.1

  7. nothing is working in my system there is an error

    ImportError Traceback (most recent call last)

    ~Anaconda3libsite-packagestensorflowpythonpywrap_tensorflow.py in swig_import_helper()

    17 try:

    —> 18 fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])

    19 except ImportError:

    ~Anaconda3libimp.py in find_module(name, path)

    296 else:

    –> 297 raise ImportError(_ERR_MSG.format(name), name=name)

    298

    ImportError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    ModuleNotFoundError Traceback (most recent call last)

    ~Anaconda3libsite-packagestensorflowpython__init__.py in <module>()

    53 # use `dlopen()` for dynamic loading.

    —> 54 from tensorflow.python import pywrap_tensorflow

    55 except ImportError:

    ~Anaconda3libsite-packagestensorflowpythonpywrap_tensorflow.py in <module>()

    27 return _mod

    —> 28 _pywrap_tensorflow = swig_import_helper()

    29 del swig_import_helper

    ~Anaconda3libsite-packagestensorflowpythonpywrap_tensorflow.py in swig_import_helper()

    19 except ImportError:

    —> 20 import _pywrap_tensorflow

    21 return _pywrap_tensorflow

    ModuleNotFoundError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    ImportError Traceback (most recent call last)

    <ipython-input-2-64156d691fe5> in <module>()

    —-> 1 import tensorflow as tf

    ~Anaconda3libsite-packagestensorflow__init__.py in <module>()

    22

    23 # pylint: disable=wildcard-import

    —> 24 from tensorflow.python import *

    25 # pylint: enable=wildcard-import

    26

    ~Anaconda3libsite-packagestensorflowpython__init__.py in <module>()

    58 please exit the tensorflow source tree, and relaunch your python interpreter

    59 from there.""" % traceback.format_exc()

    —> 60 raise ImportError(msg)

    61

    62 # Protocol buffers

    ImportError: Traceback (most recent call last):

    File "C:UserssohaibAnaconda3libsite-packagestensorflowpythonpywrap_tensorflow.py", line 18, in swig_import_helper

    fp, pathname, description = imp.find_module('_pywrap_tensorflow', [dirname(__file__)])

    File "C:UserssohaibAnaconda3libimp.py", line 297, in find_module

    raise ImportError(_ERR_MSG.format(name), name=name)

    ImportError: No module named '_pywrap_tensorflow'

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):

    File "C:UserssohaibAnaconda3libsite-packagestensorflowpython__init__.py", line 54, in <module>

    from tensorflow.python import pywrap_tensorflow

    File "C:UserssohaibAnaconda3libsite-packagestensorflowpythonpywrap_tensorflow.py", line 28, in <module>

    _pywrap_tensorflow = swig_import_helper()

    File "C:UserssohaibAnaconda3libsite-packagestensorflowpythonpywrap_tensorflow.py", line 20, in swig_import_helper

    import _pywrap_tensorflow

    ModuleNotFoundError: No module named '_pywrap_tensorflow'

    Error importing tensorflow. Unless you are using bazel,

    you should not try to import tensorflow from its source directory;

    please exit the tensorflow source tree, and relaunch your python interpreter

    from there.

  8. Thanks Jeff for your immense help! – i was about to give up installing tensor flow and thus giving up on Deep Learning – and that very moment, your video just got my world back!! – thanks a ton ๐Ÿ™‚

  9. Hello sir,
    After i installed anaconda and tried to "conda install jupyter" , its throwing error for me as i'conda is not recognized as an internal or external command' . can you please help me in this.

    Thanks,
    Anil.

  10. i installed Tensorflow and keras successfully and updrate all . i can import Tensorflow using command port.but I found a problem that when i runn the code from Jupytar or spyder then it get an error that .Tensorflow is not found …can anyone tell me ,,, what is the problem

  11. when I try to install Tensorflow in win10 64bit this error comes out. ""Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'C:\ProgramData\Anaconda3\Lib\site-packages\msgpack\exceptions.py'

    Consider using the `–user` option or check the permissions.

Leave a Reply

Your email address will not be published.


*