I\'m trying to intstall TensorFlow using pip:
$ pip install tensorflow --user
Collecting tensorflow
Could not find
This worked for me with Python 2.7 on Mac OS X Yosemite 10.10.5:
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
For windows this worked for me,
Download the wheel from this link. Then from command line navigate to your download folder where the wheel is present and simply type in the following command -
pip install tensorflow-1.0.0-cp36-cp36m-win_amd64.whl
The URL to install TensorFlow in Windows, below is the URL. It worked fine for me.
python -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
Nothing here worked for me on Windows 10. Perhaps an updated solution below that did work for me.
python -m pip install --upgrade tensorflow
.
This is using Python 3.6 and tensorflow 1.5 on Windows 10
Here is my Environment (Windows 10 with NVIDIA GPU). I wanted to install TensorFlow 1.12-gpu and failed multiple times but was able to solve by following the below approach.
This is to help Installing TensorFlow-GPU on Windows 10 Systems
Steps:
a. Go to windows explorer, open device manager-->check “Display Adaptors”-->it will show (ex. NVIDIA GeForce) if you have GPU else it will show “HD Graphics”
b. If the GPU is AMD’s then tensorflow doesn’t support AMD’s GPU
a. If you find your GPU model at this link, then it supports CUDA.
b. If you don’t have CUDA enabled GPU, then you can install only tensorflow (without gpu)
a. Go to control panel-->search for “Programs and Features”, and search “python”
b. Uninstall things like anaconda and any pythons related plugins. These dependencies might interfere with the tensorflow-GPU installation.
c. Make sure python is uninstalled. Open a command prompt and type “python”, if it throws an error, then your system has no python and your can proceed to freshly install python
a.TF1.12 supports upto Python 3.6.6. Click here to download Windows x86-64 executable installer
b. While installing, select “Add Python 3.6 to PATH” and then click “Install Now”.
c. After successful installation of python, the installation window provides an option for disabling path length limit which is one of the root-cause of Tensorflow build/Installation issues in Windows 10 environment. Click “Disable path length limit” and follow the instructions to complete the installation.
d. Verify whether python installed correctly. Open a command prompt and type “python”. It should show the version of Python.
Visual Studio 2017 Community
a. Click the "Visual Studio Link" above.Download Visual Studio 2017 Community.
b. Under “Visual Studio IDE” on the left, select “community 2017” and download it
c. During installation, Select “Desktop development with C++” and install
https://developer.nvidia.com/cuda-90-download-archive?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exelocal
a. Click "Link to CUDA 9.0 toolkit" above, download “Base Installer”
b. Install CUDA 9.0
https://developer.nvidia.com/cudnn
a. Click "Link to Install cuDNN" and select “I Agree To the Terms of the cuDNN Software License Agreement”
b. Register for login, check your email to verify email address
c. Click “cuDNN Download” and fill a short survey to reach “cuDNN Download” page
d. Select “ I Agree To the Terms of the cuDNN Software License Agreement”
e. Select “Download cuDNN v7.5.0 (Feb 21, 2019), for CUDA 9.0"
f. In the dropdown, click “cuDNN Library for Windows 10” and download
g. Go to the folder where the file was downloaded, extract the files
h. Add three folders (bin, include, lib) inside the extracted file to environment
i. Type “environment” in windows 10 search bar and locate the “Environment Variables” and click “Path” in “User variable” section and click “Edit” and then select “New” and add those three paths to three “cuda” folders
j. Close the “Environmental Variables” window.
a. Open a command prompt and type “pip install --upgrade tensorflow-gpu”
b. It will install tensorflow-gpu
a. Type “python” at the command prompt
b. Type “import tensorflow as tf
c. hello=tf.constant(‘Hello World!’)
d. sess=tf.Session()
e. print(sess.run(hello)) -->Hello World!
a. from tensorflow.python.client import device_lib print(device_lib.list_local_devices())
b. print(device_lib.list_local_devices())
If you're trying to install tensorflow in anaconda and it isn't working, then you may need to downgrade python version because only 3.6.x
is currently supported while anaconda has the latest version.
check python version: python --version
if version > 3.6.x
then follow step 3, otherwise stop, the problem may be somewhere else
conda search python
conda install python=3.6.6
Check version again: python --version
If version is correct, install tensorflow (step 7)
pip install tensorflow