pip::No matching distribution found for tensorflow-gpu - python

I followed this tutorial to install Tensorflow for Windows 10. However, I get this error. What's the cause and fix?
C:\Users\mona6>conda create -n tensorflow-gpu python=3.6
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment C:\Users\mona6\AppData\Local\conda\conda\envs\tensorflow-gpu:
The following NEW packages will be INSTALLED:
pip: 9.0.1-py36_1
python: 3.6.1-0
setuptools: 27.2.0-py36_1
vs2015_runtime: 14.0.25123-0
wheel: 0.29.0-py36_0
Proceed ([y]/n)? y
python-3.6.1-0 100% |###############################| Time: 0:00:01 17.89 MB/s
#
# To activate this environment, use:
# > activate tensorflow-gpu
#
# To deactivate this environment, use:
# > deactivate tensorflow-gpu
#
# * for power-users using bash, you must source
#
C:\Users\mona6>activate tensorflow-gpu
(tensorflow-gpu) C:\Users\mona6>pip install tensorflow-gpu
Collecting tensorflow-gpu
Could not find a version that satisfies the requirement tensorflow-gpu (from versions: )
No matching distribution found for tensorflow-gpu

This worked for me:
(tensorflow-gpu) C:\Users\mona6>conda create -n py35 python=3.5
Fetching package metadata ...........
Solving package specifications: .
Package plan for installation in environment C:\Users\mona6\AppData\Local\conda\conda\envs\py35:
The following NEW packages will be INSTALLED:
pip: 9.0.1-py35_1
python: 3.5.3-0
setuptools: 27.2.0-py35_1
vs2015_runtime: 14.0.25123-0
wheel: 0.29.0-py35_0
Proceed ([y]/n)? y
python-3.5.3-0 100% |###############################| Time: 0:00:01 22.65 MB/s
setuptools-27. 100% |###############################| Time: 0:00:00 13.10 MB/s
wheel-0.29.0-p 100% |###############################| Time: 0:00:00 16.25 MB/s
pip-9.0.1-py35 100% |###############################| Time: 0:00:00 12.54 MB/s
#
# To activate this environment, use:
# > activate py35
#
# To deactivate this environment, use:
# > deactivate py35
#
# * for power-users using bash, you must source
#
(tensorflow-gpu) C:\Users\mona6>activate py35
(py35) C:\Users\mona6>pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
Collecting tensorflow==1.1.0 from https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
Downloading https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl (19.4MB)
100% |################################| 19.4MB 90kB/s
Collecting wheel>=0.26 (from tensorflow==1.1.0)
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
100% |################################| 71kB 2.9MB/s
Collecting six>=1.10.0 (from tensorflow==1.1.0)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting werkzeug>=0.11.10 (from tensorflow==1.1.0)
Downloading Werkzeug-0.12.1-py2.py3-none-any.whl (312kB)
100% |################################| 317kB 3.5MB/s
Collecting protobuf>=3.2.0 (from tensorflow==1.1.0)
Downloading protobuf-3.3.0.tar.gz (271kB)
100% |################################| 276kB 3.8MB/s
Collecting numpy>=1.11.0 (from tensorflow==1.1.0)
Downloading numpy-1.12.1-cp35-none-win_amd64.whl (7.7MB)
100% |################################| 7.7MB 231kB/s
Collecting setuptools (from protobuf>=3.2.0->tensorflow==1.1.0)
Downloading setuptools-35.0.2-py2.py3-none-any.whl (390kB)
100% |################################| 399kB 3.3MB/s
Collecting appdirs>=1.4.0 (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0)
Downloading appdirs-1.4.3-py2.py3-none-any.whl
Collecting packaging>=16.8 (from setuptools->protobuf>=3.2.0->tensorflow==1.1.0)
Downloading packaging-16.8-py2.py3-none-any.whl
Collecting pyparsing (from packaging>=16.8->setuptools->protobuf>=3.2.0->tensorflow==1.1.0)
Downloading pyparsing-2.2.0-py2.py3-none-any.whl (56kB)
100% |################################| 61kB 7.2MB/s
Building wheels for collected packages: protobuf
Running setup.py bdist_wheel for protobuf ... done
Stored in directory: C:\Users\mona6\AppData\Local\pip\Cache\wheels\1b\42\a0\4c7343df5b629ec9c75655468dce7652b28026896b0209ba55
Successfully built protobuf
Installing collected packages: wheel, six, werkzeug, appdirs, pyparsing, packaging, setuptools, protobuf, numpy, tensorflow
Successfully installed appdirs-1.4.3 numpy-1.12.1 packaging-16.8 protobuf-3.3.0 pyparsing-2.2.0 setuptools-35.0.2 six-1.10.0 tensorflow-1.1.0 werkzeug-0.12.1 wheel-0.29.0
(py35) C:\Users\mona6>python
Python 3.5.3 |Continuum Analytics, Inc.| (default, Feb 22 2017, 21:28:42) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf

If you like Python3, python3.5 is the only version you can choose to run&install tensorflow.
more information from tensorflow official website:
If the following version of Python is not installed on your machine, install it now:
Python 3.5.x from python.org
TensorFlow only supports version 3.5.x of Python on Windows. Note that Python 3.5.x comes with the pip3 package manager, which is the program you'll use to install TensorFlow.
To install TensorFlow, start a terminal. Then issue the appropriate pip3 install command in that terminal. ...
So, I recommend Anaconda3-4.2.0 for you, it support Python3.5 and works on my computer both in windows and ubuntu.
here is the download link : https://repo.continuum.io/archive/
you can install Tensorflow CPU-only version by following command:
# pip install --upgrade tensorflow
To install the GPU version of Tensorflow, enter the following command:
# pip install --upgrade tensorflow-gpu
it may can help you.

Try this, way too simpler and elegant(I think)
Upgrade pip to 20+ :
pip install --upgrade pip
Then install using(Let the system decide which version is suitable) :
pip install tensorflow-gpu

Related

Librosa installation pip fail

I am trying to install librosa by pip install librosa on the mac terminal, pip3 also has the same problem. It also gets stuck when I try to install scikit-learn.
Doesn't go any further than:
Collecting librosa
Using cached librosa-0.8.1-py3-none-any.whl (203 kB)
Collecting packaging>=20.0
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Requirement already satisfied: numpy>=1.15.0 in /opt/homebrew/lib/python3.9/site-packages (from librosa) (1.21.0)
Requirement already satisfied: scipy>=1.0.0 in /opt/homebrew/lib/python3.9/site-packages (from librosa) (1.7.0)
Collecting numba>=0.43.0
Using cached numba-0.53.1.tar.gz (2.2 MB)
Collecting resampy>=0.2.2
Using cached resampy-0.2.2.tar.gz (323 kB)
Requirement already satisfied: soundfile>=0.10.2 in /opt/homebrew/lib/python3.9/site-packages (from librosa) (0.10.3.post1)
Collecting scikit-learn!=0.19.0,>=0.14.0
Using cached scikit-learn-0.24.2.tar.gz (7.5 MB)
Installing build dependencies ... \
I am very new at this, please help I just want to draw some spectrograms.
python --version
Python 2.7.16
python3 --version
Python 3.9.6
pip --version
pip 21.1.3 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)
It might be useful for you to work in a virtual environment. If you are trying to install with python 3.9 there may be a number of dependency issues, so using a lower version may also solve your issues. However, do try to with a conda environment as this will allow you to more easily keep track of install packages etc. Here are the install instructions:
After the install you can create a conda environment with a lower python version:
conda create -n "py38" python=3.8 ipython
Activate the environment:
conda activate py38
Install librosa:
conda install -c conda-forge librosa

Unable to downgrade version of Python package by `pip install -I`

To temporary workaround a compatibility issue, I tried to downgrade version of Python package arrow from 0.17.0 to 0.13.2.
On a particular server I was unable to, as the below command calls to install 0.13.2 but ends up install back 0.17.0. If remove the virtual environment, and generate a new one and freshly install 0.13.2, it works OK.
I also tested on a virtual machine, and the downgrade works OK without this symptom.
I'm wondering why, and any inputs will be highly appreciated.
(venv3.7) [user#host freeze]$ pip install -I arrow==0.13.2
Collecting arrow==0.13.2
Using cached arrow-0.13.2-py2.py3-none-any.whl (37 kB)
Collecting python-dateutil
Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting six>=1.5
Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six, python-dateutil, arrow
Successfully installed arrow-0.17.0 python-dateutil-2.8.1 six-1.15.0
(venv3.7) [user#host freeze]$
Use --force-reinstall instead of -I, --ignore-installed.
-I can break existing installs, according to the docs:
-I, --ignore-installed Ignore the installed packages, overwriting them. This can break your system if the existing package is of a different version or was installed with a different package manager!
If you want to install a version older than what you currently have installed, --force-reinsall is a better fit:
--force-reinstall Reinstall all packages even if they are already up-to-date.
A demonstration of --force-reinstall in action:
$ pip install arrow==0.17.0
Collecting arrow==0.17.0
<... snip ...>
Successfully installed arrow-0.17.0
$ pip install --force-reinstall arrow==0.13.2
Collecting arrow==0.13.2
<... snip ...>
Attempting uninstall: arrow
Found existing installation: arrow 0.17.0
Uninstalling arrow-0.17.0:
Successfully uninstalled arrow-0.17.0
Successfully installed arrow-0.13.2 python-dateutil-2.8.1 six-1.15.0
$ pip freeze | grep arrow
arrow==0.13.2
Another option from luasoftware.com
% pip install arrow
Collecting arrow
Downloading arrow-1.2.1-py3-none-any.whl (63 kB)
|████████████████████████████████| 63 kB 110 kB/s
Installing collected packages: six, python-dateutil, arrow
Successfully installed arrow-1.2.1
% pip install --upgrade arrow==0.13.2
Collecting arrow==0.13.2
Downloading arrow-0.13.2-py2.py3-none-any.whl (37 kB)
Installing collected packages: arrow
Attempting uninstall: arrow
Found existing installation: arrow 1.2.1
Uninstalling arrow-1.2.1:
Successfully uninstalled arrow-1.2.1
Successfully installed arrow-0.13.2
% pip list | grep arrow
arrow 0.13.2

dependency conflict, featexp 0.0.5 has requirement numpy==1.15.4, pydeck 0.3.0b2 has requirement numpy>=1.16.4

pip version: pip 20.0.2
Python version: Python 3.6.5 Anaconda
OS: Mac OS X 10.14.5
$ pip check
featexp 0.0.5 has requirement numpy==1.15.4, but you have numpy 1.18.2.
Then, I change the version of numpy:
$ pip install numpy==1.15.4
Collecting numpy==1.15.4
Using cached numpy-1.15.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5 MB)
ERROR: pydeck 0.3.0b2 has requirement numpy>=1.16.4, but you'll have numpy 1.15.4 which is incompatible.
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.18.2
Uninstalling numpy-1.18.2:
Successfully uninstalled numpy-1.18.2
Successfully installed numpy-1.15.4
But, pydeck 0.3.0b2 has requirement numpy>=1.16.4.
I'm stuck.

if i have PyYAML 3.12 its asking for 5.1 and if i install version 5.1 its asking 3.12

C:\Users\Admin>pip install pyyaml==5.1
Collecting pyyaml==5.1
Using cached https://files.pythonhosted.org/packages/b6/74/c3e15707516f80192059dde32c9d78f00a88c9f3c4d1efd76cbc8d5b0a20/PyYAML-5.1-cp37-cp37m-win_amd64.whl
chatterbot-corpus 1.2.0 has requirement PyYAML<4.0,>=3.12, but you'll have pyyaml 5.1 which is incompatible.
Installing collected packages: pyyaml
Found existing installation: PyYAML 3.13
Uninstalling PyYAML-3.13:
Successfully uninstalled PyYAML-3.13
Successfully installed pyyaml-5.1
You are using pip version 10.0.1, however version 19.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
C:\Users\Admin>pip install chatterbot-corpus
Requirement already satisfied: chatterbot-corpus in c:\users\admin\appdata\local\programs\python\python37\lib\site-packages (1.2.0)
Collecting PyYAML<4.0,>=3.12 (from chatterbot-corpus)
Using cached https://files.pythonhosted.org/packages/bf/96/d02ef8e1f3073e07ffdc240444e5041f403f29c0775f9f1653f18221082f/PyYAML-3.13-cp37-cp37m-win_amd64.whl
chatterbot 1.0.5 has requirement pyyaml<5.2,>=5.1, but you'll have pyyaml 3.13 which is incompatible.
Installing collected packages: PyYAML
Found existing installation: PyYAML 5.1
Uninstalling PyYAML-5.1:
Successfully uninstalled PyYAML-5.1
Successfully installed PyYAML-3.13
You have to install chatterbot_corpus and not chatterbot-corpus, are differents
pip install chatterbot_corpus
or
pip3 install chatterbot_corpus

Tensorflow on MacOS: Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

I tried to validate my tensorflow for my mac using these instructions https://www.tensorflow.org/install/install_mac#ValidateYourInstallation
but produce this result. is that ok? bad? how can i fix this? thanks
sess = tf.Session()
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
print(sess.run(hello))
b'Hello, TensorFlow!'
Mac OS version: MacOS High Sierra 10.13.6
here is the full installation and validation output:
usermacbook:tensorflowve someuser$ python3 -m venv .
usermacbook:tensorflowve someuser$ source bin/activate
(tensorflowve) usermacbook:tensorflowve someuser$ pip3 install --upgrade tensorflow
Collecting tensorflow
Downloading https://files.pythonhosted.org/packages/57/38/96ee343729363297d62311272adc28b466d30f74c87dc645badb0102af56/tensorflow-1.9.0-cp36-cp36m-macosx_10_11_x86_64.whl (48.9MB)
100% |████████████████████████████████| 48.9MB 30kB/s
Collecting termcolor>=1.1.0 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Collecting protobuf>=3.4.0 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/6d/7e/51c91b28cb8446ebd7231d375a2025bca4c59d15ddc0cf2dd0867b400cd7/protobuf-3.6.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 986kB/s
Collecting absl-py>=0.1.6 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/96/5d/18feb90462c8edaae71305716c7e8bac479fc9dface63221f808a6b95880/absl-py-0.3.0.tar.gz (84kB)
100% |████████████████████████████████| 92kB 3.7MB/s
Collecting gast>=0.2.0 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/5c/78/ff794fcae2ce8aa6323e789d1f8b3b7765f601e7702726f430e814822b96/gast-0.2.0.tar.gz
Collecting grpcio>=1.8.6 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/c2/bc/31fb22c3dcccf018341a88bb9edc642a9b78bdedf9153bd3edc0d8e2f070/grpcio-1.14.0-cp36-cp36m-macosx_10_7_intel.whl (1.9MB)
100% |████████████████████████████████| 1.9MB 654kB/s
Collecting tensorboard<1.10.0,>=1.9.0 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/9e/1f/3da43860db614e294a034e42d4be5c8f7f0d2c75dc1c428c541116d8cdab/tensorboard-1.9.0-py3-none-any.whl (3.3MB)
100% |████████████████████████████████| 3.3MB 425kB/s
Collecting numpy>=1.13.3 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/6a/d5/218414f0f41cb3f183d55d68dbcd996fa3602d5849bdf2ad6c059e98fa68/numpy-1.15.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (24.5MB)
100% |████████████████████████████████| 24.5MB 59kB/s
Collecting setuptools<=39.1.0 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/8c/10/79282747f9169f21c053c562a0baa21815a8c7879be97abd930dbcf862e8/setuptools-39.1.0-py2.py3-none-any.whl (566kB)
100% |████████████████████████████████| 573kB 1.6MB/s
Collecting six>=1.10.0 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting astor>=0.6.0 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/35/6b/11530768cac581a12952a2aad00e1526b89d242d0b9f59534ef6e6a1752f/astor-0.7.1-py2.py3-none-any.whl
Collecting wheel>=0.26 (from tensorflow)
Downloading https://files.pythonhosted.org/packages/81/30/e935244ca6165187ae8be876b6316ae201b71485538ffac1d718843025a9/wheel-0.31.1-py2.py3-none-any.whl (41kB)
100% |████████████████████████████████| 51kB 4.0MB/s
Collecting werkzeug>=0.11.10 (from tensorboard<1.10.0,>=1.9.0->tensorflow)
Downloading https://files.pythonhosted.org/packages/20/c4/12e3e56473e52375aa29c4764e70d1b8f3efa6682bef8d0aae04fe335243/Werkzeug-0.14.1-py2.py3-none-any.whl (322kB)
100% |████████████████████████████████| 327kB 2.0MB/s
Collecting markdown>=2.6.8 (from tensorboard<1.10.0,>=1.9.0->tensorflow)
Downloading https://files.pythonhosted.org/packages/6d/7d/488b90f470b96531a3f5788cf12a93332f543dbab13c423a5e7ce96a0493/Markdown-2.6.11-py2.py3-none-any.whl (78kB)
100% |████████████████████████████████| 81kB 3.7MB/s
Installing collected packages: termcolor, setuptools, six, protobuf, absl-py, gast, grpcio, numpy, werkzeug, markdown, wheel, tensorboard, astor, tensorflow
Running setup.py install for termcolor ... done
Found existing installation: setuptools 28.8.0
Uninstalling setuptools-28.8.0:
Successfully uninstalled setuptools-28.8.0
Running setup.py install for absl-py ... done
Running setup.py install for gast ... done
Successfully installed absl-py-0.3.0 astor-0.7.1 gast-0.2.0 grpcio-1.14.0 markdown-2.6.11 numpy-1.15.0 protobuf-3.6.0 setuptools-39.1.0 six-1.11.0 tensorboard-1.9.0 tensorflow-1.9.0 termcolor-1.1.0 werkzeug-0.14.1 wheel-0.31.1
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
(tensorflowve) usermacbook:tensorflowve someuser$ python
Python 3.6.3 (v3.6.3:2c5fed86e0, Oct 3 2017, 00:32:08)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
2018-08-04 09:28:35.905544: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
>>> print(sess.run(hello))
b'Hello, TensorFlow!'
Tensorflow compiled with the advanced instructions can run 40% faster than the non-optimised code, so please don't ignore this message!
I would recommend building TF from source, here are the steps to download, compile and install v2.0 beta, including the link to the compiled .whl file.
First, uninstall the default version:
sudo pip3 uninstall protobuf
sudo pip3 uninstall tensorflow
In a temp folder, clone Tensorflow:
git clone https://github.com/tensorflow/tensorflow
git checkout r2.0
Install the TensorFlow pip package dependencies:
pip3 install -U --user pip six numpy wheel setuptools mock future>=0.17.1
pip3 install -U --user keras_applications==1.0.6 --no-deps
pip3 install -U --user keras_preprocessing==1.0.5 --no-deps
Install Bazel, the build tool used to compile TensorFlow. After downloading bazel-0.26.0-installer-darwin-x86_64.sh:
chmod +x bazel-0.26.0-installer-darwin-x86_64.sh ./bazel-0.26.0-installer-darwin-x86_64.sh --user export PATH="$PATH:$HOME/bin" bazel version
Configure your system build by running the following at the root of your TensorFlow source tree:
./configure
Use bazel to make the TensorFlow package builder with CPU-only support:
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.2 //tensorflow/tools/pip_package:build_pip_package
The bazel build command creates an executable named build_pip_package—this is the program that builds the pip package. Run the executable as shown below to build a .whl package in the /tmp/tensorflow_pkg directory.
To build from a release branch:
./bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflow_pkg
The output wheel file is in: /tmp/tensorflow_pkg. You may download the file from here, and try to install it directly
pip3 install /tmp/tensorflow_pkg/tensorflow-2.0.0b1-cp37-cp37m-macosx_10_14_x86_64.whl
cd out of that directory, and now running this should not produce any warning:
python3 -c "import tensorflow as tf;print(tf.reduce_sum(tf.random.normal([1000, 1000])))"
The original post was published here.
This is not an error. Tensorflow is running just fine.
It's a warning saying that Tensorflow is NOT taking advantage of some of the advanced instructions available on your CPU because its binary was compiled not to use these instructions (so it could run on older CPUs).
Your options are:
Ignore it.
Silence it (see the other answer).
Build the Tensorflow from source.
The #3 may make sense if you expect to perform a lot of computations on CPU: it could somewhat improve the performance. However, it would take time and effort, so I would not recommend it for a beginner: just use Tensorflow as-is.
P.S. b'Hello, TensorFlow!' is fine too. See:
The print of string constant is always attached with 'b' inTensorFlow
import os os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import tensorflow as tf
Currently, I have encountered the same problem.
2018-10-01 10:43:40.926651: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
Set environment variables before running.
Windows:
$ set TF_CPP_MIN_LOG_LEVEL=2
Linux/MacOS:
$ export TF_CPP_MIN_LOG_LEVEL=2
Through the above settings, I have solved the remaining error.

Categories

Resources