TensorFlow uses GitHub issues,
Stack Overflow and
TensorFlow Forum
to track, document, and discuss build and installation problems.
The following list links error messages to a solution or discussion. If you find
an installation or build problem that is not listed, please search the GitHub
issues and Stack Overflow. If you still can’t find the error message, ask a new
question on Stack Overflow with the tensorflow
tag.
GitHub issue or Stack Overflow | Error Message |
---|---|
38896424 31058 |
«No matching distribution found for tensorflow»: Pip can’t find a TensorFlow package compatible with your system. Check the system requirements and Python version |
22390 |
Unzipping simple_console_for_windows.zip to create runfiles tree... [./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip] End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip or ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip.zip, and cannot find ./bazel-bin/tensorflow/tools/pip_package/simple_console_for_windows.zip.ZIP, period. |
36159194 |
ImportError: libcudart.so.Version: cannot open shared object file: No such file or directory |
41991101 |
ImportError: libcudnn.Version: cannot open shared object file: No such file or directory |
36371137 |
libprotobuf ERROR google/protobuf/src/google/protobuf/io/coded_stream.cc:207] A protocol message was rejected because it was too big (more than 67108864 bytes). To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. |
35252888 |
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. |
33623453 |
IOError: [Errno 2] No such file or directory: '/tmp/pip-o6Tpui-build/setup.py' |
42006320 |
ImportError: Traceback (most recent call last): File ".../tensorflow/core/framework/graph_pb2.py", line 6, in from google.protobuf import descriptor as _descriptor ImportError: cannot import name 'descriptor' |
35190574 |
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed |
42009190 |
Installing collected packages: setuptools, protobuf, wheel, numpy, tensorflow Found existing installation: setuptools 1.1.6 Uninstalling setuptools-1.1.6: Exception: ... [Errno 1] Operation not permitted: '/tmp/pip-a1DXRT-uninstall/.../lib/python/_markerlib' |
36933958 |
... Installing collected packages: setuptools, protobuf, wheel, numpy, tensorflow Found existing installation: setuptools 1.1.6 Uninstalling setuptools-1.1.6: Exception: ... [Errno 1] Operation not permitted: '/tmp/pip-a1DXRT-uninstall/System/Library/Frameworks/Python.framework/ Versions/2.7/Extras/lib/python/_markerlib' |
42006320 |
ImportError: Traceback (most recent call last): File ".../tensorflow/core/framework/graph_pb2.py", line 6, in from google.protobuf import descriptor as _descriptor ImportError: cannot import name 'descriptor' |
33623453 |
IOError: [Errno 2] No such file or directory: '/tmp/pip-o6Tpui-build/setup.py' |
35190574 |
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed |
42009190 |
Installing collected packages: setuptools, protobuf, wheel, numpy, tensorflow Found existing installation: setuptools 1.1.6 Uninstalling setuptools-1.1.6: Exception: ... [Errno 1] Operation not permitted: '/tmp/pip-a1DXRT-uninstall/.../lib/python/_markerlib' |
33622019 |
ImportError: No module named copyreg |
37810228 | During a pip install operation, the system returns:
OSError: [Errno 1] Operation not permitted |
33622842 | An import tensorflow statement triggers an error such as the following: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in from tensorflow.python import * ... File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 22, in serialized_pb=_b('n,tensorflow/core/framework/tensor_shape.protox12ntensorflow"dnx10TensorShapeProtox12-nx03x64imx18x02 x03(x0bx32 .tensorflow.TensorShapeProto.Dimx1a!nx03x44imx12x0cnx04sizex18x01 x01(x03x12x0cnx04namex18x02 x01(tbx06proto3') TypeError: __init__() got an unexpected keyword argument 'syntax' |
42075397 | A pip install command triggers the following error:
... You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements. ... File "numpy/core/setup.py", line 653, in get_mathlib_info raise RuntimeError("Broken toolchain: cannot link a simple C program") RuntimeError: Broken toolchain: cannot link a simple C program |
41007279 |
[...stream_executordso_loader.cc] Couldn't open CUDA library nvcuda.dll |
41007279 |
[...stream_executorcudacuda_dnn.cc] Unable to load cuDNN DSO |
42006320 |
ImportError: Traceback (most recent call last): File "...tensorflowcoreframeworkgraph_pb2.py", line 6, in from google.protobuf import descriptor as _descriptor ImportError: cannot import name 'descriptor' |
42011070 |
No module named "pywrap_tensorflow" |
42217532 |
OpKernel ('op: "BestSplits" device_type: "CPU"') for unknown op: BestSplits |
43134753 |
The TensorFlow library wasn't compiled to use SSE instructions |
38896424 |
Could not find a version that satisfies the requirement tensorflow |
42006320 |
ImportError: Traceback (most recent call last): File ".../tensorflow/core/framework/graph_pb2.py", line 6, in from google.protobuf import descriptor as _descriptor ImportError: cannot import name 'descriptor' |
33623453 |
IOError: [Errno 2] No such file or directory: '/tmp/pip-o6Tpui-build/setup.py' |
35190574 |
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed |
42009190 |
Installing collected packages: setuptools, protobuf, wheel, numpy, tensorflow Found existing installation: setuptools 1.1.6 Uninstalling setuptools-1.1.6: Exception: ... [Errno 1] Operation not permitted: '/tmp/pip-a1DXRT-uninstall/.../lib/python/_markerlib' |
33622019 |
ImportError: No module named copyreg |
37810228 | During a pip install operation, the system returns:
OSError: [Errno 1] Operation not permitted |
33622842 | An import tensorflow statement triggers an error such as the following: Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/site-packages/tensorflow/__init__.py", line 4, in from tensorflow.python import * ... File "/usr/local/lib/python2.7/site-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 22, in serialized_pb=_b('n,tensorflow/core/framework/tensor_shape.protox12ntensorflow"dnx10TensorShapeProtox12-nx03x64imx18x02 x03(x0bx32 .tensorflow.TensorShapeProto.Dimx1a!nx03x44imx12x0cnx04sizex18x01 x01(x03x12x0cnx04namex18x02 x01(tbx06proto3') TypeError: __init__() got an unexpected keyword argument 'syntax' |
41293077 |
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. |
42013316 |
ImportError: libcudart.so.8.0: cannot open shared object file: No such file or directory |
42013316 |
ImportError: libcudnn.5: cannot open shared object file: No such file or directory |
35953210 | Invoking `python` or `ipython` generates the following error:
ImportError: cannot import name pywrap_tensorflow |
45276830 |
external/local_config_cc/BUILD:50:5: in apple_cc_toolchain rule @local_config_cc//:cc-compiler-darwin_x86_64: Xcode version must be specified to use an Apple CROSSTOOL. |
47080760 |
undefined reference to `cublasGemmEx@libcublas.so.9.0' |
22512 |
ModuleNotFoundError: No module named 'tensorflow.python._pywrap_tensorflow_internal' |
22512, 22794 |
ImportError: DLL load failed: The specified module could not be found. |
24835 |
Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: [long path name] |
System information
- OS Platform and Distribution (e.g., Linux Ubuntu 16.04): macOS 11.2.1, x86-64
- TensorFlow installed from (source or binary):
pip3 install tensorflow
- TensorFlow version: latest
- Python version: 3.8
- Installed using: pip3
Describe the problem
Installation with pip
fails with:
$ pip3 install tensorflow
ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow
Provide the exact sequence of commands / steps that you executed before running into the problem
# TensorFlow apparently does not yet support 3.9, so fall back to 3.8
brew install python@3.8
brew link --overwrite python@3.8
pip3 install tensorflow
Any other info / logs
Here is verbose output:
$ pip3 install --upgrade -v tensorflow Using pip 20.2.4 from /usr/local/lib/python3.8/site-packages/pip (python 3.8) Non-user install because site-packages writeable Created temporary directory: /private/var/folders/7g/m6tkc5n56l7ds_6dyr28jvb00000gn/T/pip-ephem-wheel-cache-v942l1u1 Created temporary directory: /private/var/folders/7g/m6tkc5n56l7ds_6dyr28jvb00000gn/T/pip-req-tracker-vv4x81gu Initialized build tracking at /private/var/folders/7g/m6tkc5n56l7ds_6dyr28jvb00000gn/T/pip-req-tracker-vv4x81gu Created build tracker: /private/var/folders/7g/m6tkc5n56l7ds_6dyr28jvb00000gn/T/pip-req-tracker-vv4x81gu Entered build tracker: /private/var/folders/7g/m6tkc5n56l7ds_6dyr28jvb00000gn/T/pip-req-tracker-vv4x81gu Created temporary directory: /private/var/folders/7g/m6tkc5n56l7ds_6dyr28jvb00000gn/T/pip-install-wju8g2vw 1 location(s) to search for versions of tensorflow: * https://pypi.org/simple/tensorflow/ Fetching project page and analyzing links: https://pypi.org/simple/tensorflow/ Getting page https://pypi.org/simple/tensorflow/ Found index url https://pypi.org/simple Looking up "https://pypi.org/simple/tensorflow/" in the cache Request header has "max_age" as 0, cache bypassed Starting new HTTPS connection (1): pypi.org:443 https://pypi.org:443 "GET /simple/tensorflow/ HTTP/1.1" 304 0 Skipping link: none of the wheel's tags match: cp27-cp27m-macosx_10_11_x86_64: https://files.pythonhosted.org/packages/90/cf/1d1e12f9f39b6a0ed1c49792ef5ce7615dddc2ce7287fc83ede0dddb9b3c/tensorflow-0.12.0rc0-cp27-cp27m-macosx_10_11_x86_64.whl#sha256=feaf06c7df5c0a480654bf1f38dd4d3b809c7315502a7d9f295033f9d2bd9b13 (from https://pypi.org/simple/tensorflow/) ... OMITTING EXTREMELY LONG LIST OF WHEELS ... Skipping link: none of the wheel's tags match: cp38-cp38-win_amd64: https://files.pythonhosted.org/packages/ad/fc/fccaa149d7ccc165de01d62d19e5e9492e87ad23a7106f6dfe132800ca6f/tensorflow-2.4.1-cp38-cp38-win_amd64.whl#sha256=eedcf578afde5e6e69c75d796bed41093451cd1ab54afb438760e40fb74a09de (from https://pypi.org/simple/tensorflow/) Given no hashes to check 0 links for project 'tensorflow': discarding no candidates Exception information: Traceback (most recent call last): File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 228, in _main status = self.run(options, args) File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper return func(self, options, args) File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 323, in run requirement_set = resolver.resolve( File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 183, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 388, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 339, in _get_abstract_dist_for self._populate_link(req) File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 305, in _populate_link req.link = self._find_requirement_link(req) File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/legacy/resolver.py", line 270, in _find_requirement_link best_candidate = self.finder.find_requirement(req, upgrade) File "/usr/local/lib/python3.8/site-packages/pip/_internal/index/package_finder.py", line 928, in find_requirement raise DistributionNotFound( pip._internal.exceptions.DistributionNotFound: No matching distribution found for tensorflow Removed build tracker: '/private/var/folders/7g/m6tkc5n56l7ds_6dyr28jvb00000gn/T/pip-req-tracker-vv4x81gu'
The cause seems to be that it expects at least one wheel whose tags match my machine, but none do. My guess is that this is due to using macOS 11. All lines look like macosx_10_*_x86_64
, but I guess it’s looking for a line matching macosx_11_*_x86_64
. (Apologies: I know nothing about the python ecosystem; this is just my educated guess.)
Get this book -> Problems on Array: For Interviews and Competitive Programming
In this article, we have presented the reason behind the error «No matching distribution found for TensorFlow using pip» along with 3 approaches to fix it.
Command used:
pip install tensorflow --user
Error:
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
Table of contents:
- Reason behind the error
- Fix 1: Install wheel file directly
- Fix 2: Update Python and Pip
- Fix 3: Build TensorFlow from source
Reason behind the error
The reason behind the issue will be that the Python installed on your system does not have a corresponding TensorFlow.
Through pip, TensorFlow only supports specific Python version and cases such as:
- 64-bit system
- Python version 3.7 to 3.10
- Ubuntu 16.04 and later versions
- Windows 7 and later version (with C++)
So, if your system has 32-bit version of Python or a lower version of Python or an older Ubuntu version, then you will face this error.
Different TensorFlow have different dependencies. For example, TensorFlow version 1.12.0 works with Python version 3.5.2 only while TensorFlow version 2.10.0 requires Python version 3.8+.
Fix 1: Install wheel file directly
If you have a pre-built wheel file that matches your system’s Python and pip version, you can install the wheel file directly.
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-2.10.0-py3-none-any.whl
Fix 2: Update Python and Pip
Installing TensorFlow using pip requires you to have 64-bit version of Python version 3.5 to 3.8 and pip version 8.1 and above.
If you have a lower version, upgrading Python and pip will fix the problem.
pip install --upgrade pip
Fix 3: Build TensorFlow from source
If you build TensorFlow from source, you will not face this issue and TensorFlow will get build with any version of Python and pip.
- Follow these steps:
git clone https://github.com/tensorflow/tensorflow.git
cd tensorflow
./configure
- Build the pip wheel file
bazel build -c opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-mavx512
--copt=-mavx512f --copt=-mavx512vnni --copt=-mfpmath=both --copt=-msse4.1
--copt=-msse4.2 -k //tensorflow/tools/pip_package:build_pip_package
Note the optimization flags used such has—copt=-mavx512f
- Prepare the wheel file
bazel-bin/tensorflow/tools/pip_package/
build_pip_package /tmp/tensorflow_pkg
- Install the wheel file and use TensorFlow
pip install tensorflow-2.10.0-wheel --force
With this article at OpenGenus, you must have fixed the issue of installing TensorFlow using pip.
Hello Guys, How are you all? Hope You all Are Fine. Today I am just trying to install tensor flow with this command pip3 install tensorflow But I am facing following error No matching distribution found for tensorflow in python. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
Contents
- How No matching distribution found for tensorflow Error Occurs ?
- How To Solve No matching distribution found for tensorflow Error ?
- Solution 1: Just Run this command.
- Solution 2: Use 64-bit version of Python
- Solution 3: Try to update pip
- Solution 4: Tensorflow support 3.7.x and 3.9.x
- Summary
How No matching distribution found for tensorflow Error Occurs ?
I am just trying to install tensor flow with this command.
pip3 install tensorflow
But I am facing following error.
Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
How To Solve No matching distribution found for tensorflow Error ?
- How To Solve No matching distribution found for tensorflow Error ?
To Solve No matching distribution found for tensorflow Error I was facing same error But resolved it by running this command pip3 install –upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl Second solution is Tensorflow is only working with 64-bit version of Python. If you are using 32-bit version of Python then you have to face this error. So That Just use install the 64-bit version of Python latest version via Python’s website.
- No matching distribution found for tensorflow
To Solve No matching distribution found for tensorflow Error I was facing same error But resolved it by running this command pip3 install –upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl Second solution is Tensorflow is only working with 64-bit version of Python. If you are using 32-bit version of Python then you have to face this error. So That Just use install the 64-bit version of Python latest version via Python’s website.
Solution 1: Just Run this command.
I was facing same error But resolved it by running this command.
If You are using Pip Then Run this command.
pip3 install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.0.0-py3-none-any.whl
If You are using Python 3 Then Run this command.
python3 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py3-none-any.whl
If You are using Python 2 Then Run this command.
python2 -m pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.12.0-py2-none-any.whl
Solution 2: Use 64-bit version of Python
Tensorflow is only working with 64-bit version of Python. If you are using 32-bit version of Python then you have to face this error.
So That Just use install the 64-bit version of Python latest version via Python’s website.
Solution 3: Try to update pip
As per Tensorflow statement You will need pip version 8.1 or later for the following commands to work. Just run this command to update pip.
pip install --upgrade pip
Solution 4: Tensorflow support 3.7.x and 3.9.x
Here is Official Tensorflow supported version. TensorFlow is tested and supported on the following 64-bit systems:
- Python 3.7–3.9
- Ubuntu 16.04 or later
- Windows 7 or later (with C++ redistributable)
- macOS 10.12.6 (Sierra) or later (no GPU support)
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- Could not find a version that satisfies the requirement tensorflow
Tensorflow is an open-source platform for Artificial intelligence and it comprises of extensive libraries and community resources that lets researchers push the state-of-the-art in Machine Learning and engineers effectively manufacture and embed ML controlled applications on Microcontrollers and Microprocessors. The computer geeks are able to install Python and PyCharm easily on their systems but when they try to install Tensorflow they encounter the error message: “Could not find a version that satisfies the requirement TensorFlow (from versions: ) No matching distribution found for TensorFlow”. Many people have installed Flask to get rid of this issue but they aren’t able to hence, keeping this in view I’ve compiled some possible solutions to this problem and follow this guide throughout to get rid of this error.
As it turns out, there are several different causes that might end up causing this issue hence let’s move a step ahead and test some fixes until we are able to eliminate this glitch on Windows.
Method 1: Verify Python Version On Your System
If you are running Windows 10, with Python 3.6.X version on your system then most probably Python-32 bit version would’ve been running on 64bit machine. Keep one thing in mind that TensorFlow is only compatible with 64bit installation of python and not 32bit version of python. If you’ve downloaded Python from python.org, the default installation would be 32 bit hence in order to get rid of this issue download a 64bit installer from here. Now, we need to set the PATH environment variable because it lists the directories that will be searched for executables when you type a command in the command prompt. By adding the path to the Python executable, you will be able to access python.exe by typing the python keyword (you won’t need to specify the full path to the program). If the PATH variable is not set the following error occurs:
C:>python 'python' is not recognized as an internal or external command, operable program or batch file.
As you can see that the command was not found hence to run python.exe, you need to specify the full path to the executable hence to specify the full path to the variable, follow the steps indexed below:
- Right-click on My Computer and afterward click on Properties button.
Choose Properties - On the left side of the window look for Advanced System Settings and after clicking on it you’ll observe that System Properties Window will be opened.
System properties - Now look for PATH variable option and click on Edit. Position your cursor at the end of the Variable value line and add the path to the python.exe file preceded with the semicolon character (;). In my case, I have added the following value: C:Python36 because I want to run Python 3.6 version.
Assign Variable Value - Close all the Windows and search for Command Prompt. In the command window type the following command and hit enter. You’ll see that now the 64bit version is present on your system and now I’ll try to install TensorFlow and check whether the error is still there or not:
C:>python --version Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)]
- Run the following command to install TensorFlow on your system and hopefully now the installation will proceed without any error message. Note: TensorFlow is not yet in the PyPI repository, so you have to specify the URL to the appropriate “wheel file” for your operating system and Python version.
pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
Install Tensorflow
Method 2: Downgrade Your Python Version On Anaconda
Tensorflow only supports Python 3.6.x and only the 64bit version. Hence if you are running GUI like anaconda and python 3.7 is installed by default on it hence, we have to downgrade it to 3.6 to install the Tensorflow. For doing this task run the commands stated below on your Anaconda prompt:
conda install python=3.6.4
After running this command wait for a couple of seconds and then create a Virtual Environment for installing Tensorflow. Name the virtual environment such as “ab” and then install the current release of CPU-only TensorFlow:
conda create -n ab tensorflow conda activate tf
After downgrading your python version the Tensorflow will now be installed without displaying any error and even if you’ve installed the Desktop version of Ubuntu it will work for that too.
Method 3: Update Package Installer For Python
Pip is the package installer for Python and we can use pip to install packages from the Python Package Index and other indexes. Although updates are released regularly after three months and these packages need to be updated manually on your system by running certain commands. If these are not outdated they might cause this Tensorflow installation error hence, we will update the pip package by running the following commands below so that all the packages are updated automatically:
pip install --upgrade pip pip install --upgrade https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-0.12.0-py3-none-any.whl
After updating the pip packages hopefully, your installation will run smoothly and you’ll be able to develop interesting programming projects using Tensorflow now.
Workaround: There may not be a version of TensorFlow that is compatible with your version of Python. This is particularly true if you’re using a new release of Python. For example, there may be a delay between the release of a new version of Python and the release of TensorFlow for that version of Python. In this case, I believe that the options mentioned above like downgrading to the previous version of Python, Compiling TensorFlow from the source code and waiting for a matching version of TensorFlow to be released are all the possible remedies that could allow you to install Tensorflow on your system without any glitches.
Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.