Error could not find a version that satisfies the requirement tensorflow gpu from versions none

I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing

I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing Tensorflow it didn’t install, and I got the error message:

Could not find a version that satisfies the requirement TensorFlow (from versions: )
No matching distribution found for TensorFlow.

Then I tried installing TensorFlow from the command prompt and I got the same error message.
I did however successfully install tflearn.

I also installed Python 2.7, but I got the same error message again. I googled the error and tried some of the things which were suggested to other people, but nothing worked (this included installing Flask).

How can I install Tensorflow? Thanks.

asked Feb 10, 2018 at 12:35

Martin W's user avatar

9

The latest requirements for running TensorFlow are documented in the installation documentation.

  • TensorFlow only supports 64-bit Python

  • TensorFlow only supports certain versions of Python (for example, Python 3.6 is not supported)

So, if you’re using an out-of-range version of Python (older or newer) or a 32-bit version, then you’ll need to use a different version.

rgov's user avatar

rgov

3,1771 gold badge29 silver badges44 bronze badges

answered Aug 13, 2018 at 23:44

David Prun's user avatar

David PrunDavid Prun

8,09515 gold badges58 silver badges86 bronze badges

13

I installed it successfully by pip install https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-1.8.0-py3-none-any.whl

answered May 5, 2019 at 2:29

Anil Sah's user avatar

Anil SahAnil Sah

1,3728 silver badges11 bronze badges

7

There are a few important rules to install Tensorflow:

  • You have to install Python x64. It doesn’t work with x86/32b and it gives the same error as yours.

  • Python versions later than 3.8 and Python 3.8 requires TensorFlow 2.2 or later. Check for supported Python versions.

For example, for TensorFlow 2.9, you can install Python3.8.6-64bit and it works like a charm. Check the latest information on the website.

answered Nov 7, 2018 at 6:53

Moradnejad's user avatar

MoradnejadMoradnejad

3,3262 gold badges27 silver badges51 bronze badges

4

if you are using anaconda, python 3.7 is installed by default, so you have to downgrade it to 3.6:

conda install python=3.6

then:

pip install tensorflow

it worked for me in Ubuntu.

answered Nov 26, 2018 at 20:19

Minions's user avatar

MinionsMinions

4,7883 gold badges46 silver badges88 bronze badges

1

I am giving it for Windows

If you are using python-3

  1. Upgrade pip to the latest version using py -m pip install --upgrade pip
  2. Install package using py -m pip install <package-name>

If you are using python-2

  1. Upgrade pip to the latest version using py -2 -m pip install --upgrade pip
  2. Install package using py -2 -m pip install <package-name>

It worked for me

ramazan polat's user avatar

answered Mar 22, 2018 at 15:42

Ankur Bhatia's user avatar

5

Tensorflow 2.2.0 supports Python3.8

First, make sure to install Python 3.8 64bit. For some reason, the official site defaults to 32bit. Verify this using python -VV (two capital V, not W). Then continue as usual:

python -m pip install --upgrade pip
python -m pip install wheel  # not necessary
python -m pip install tensorflow

As usual, make sure you have CUDA 10.1 and CuDNN installed.

answered Apr 29, 2020 at 9:57

Elazar's user avatar

ElazarElazar

19.7k4 gold badges44 silver badges67 bronze badges

9

Tensorflow isn’t available for python 3.8 (as of Dec 4th 2019) according to their documentation page. You will have to downgrade to python 3.7.

Martin W's user avatar

Martin W

4,2983 gold badges17 silver badges27 bronze badges

answered Dec 4, 2019 at 20:41

mithunpaul's user avatar

mithunpaulmithunpaul

3,13822 silver badges19 bronze badges

1

I am using python 3.6.8, on ubunu 18.04, for me the solution was to just upgrade pip

pip install --upgrade pip
pip install tensorflow==2.1.0

answered Mar 6, 2020 at 8:29

Jop Knoppers's user avatar

Jop KnoppersJop Knoppers

6541 gold badge11 silver badges22 bronze badges

1

Uninstalling Python and then reinstalling solved my issue and I was able to successfully install TensorFlow.

answered Feb 11, 2018 at 19:01

Martin W's user avatar

Martin WMartin W

4,2983 gold badges17 silver badges27 bronze badges

(as of Jan 1st, 2021)

Any over version 3.9.x there is no support for TensorFlow 2. If you are installing packages via pip with 3.9, you simply get a «package doesn’t exist» message. After reverting to the latest 3.8.x. Thought I would drop this here, I will update when 3.9.x is working with Tensorflow 2.x

answered Jan 2, 2021 at 9:47

Gregg Harrington's user avatar

So here’s the message that I got on a M1 Pro while I was executing

python -m pip install tensorflow-macos

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none)
ERROR: No matching distribution found for tensorflow

I then re-installed python from the official source:

https://www.python.org/downloads/macos/

(Yes, as stupid as it seems.)

I then followed the Apple tutorial for Monterey:

https://developer.apple.com/metal/tensorflow-plugin/

Everything was solved by then.

answered Feb 1, 2022 at 0:06

SHANNAX's user avatar

SHANNAXSHANNAX

1702 silver badges5 bronze badges

4

Apple Silicon (M1+ Chip)

If you are using a Mac with an M1 chip or higher, you need to install Tensorflow metal plugin for compatability with your architecture.

Simple installation instructions for Tensor Flow are found on Apple’s website: https://developer.apple.com/metal/tensorflow-plugin

answered Sep 9, 2022 at 17:57

Albert Renshaw's user avatar

Albert RenshawAlbert Renshaw

16.9k18 gold badges103 silver badges189 bronze badges

Looks like the problem is with Python 3.8. Use Python 3.7 instead. Steps I took to solve this.

  • Created a python 3.7 environment with conda
  • List item Installed rasa using pip install rasa within the environment.

Worked for me.

answered Jan 21, 2020 at 7:52

Rahul Sattar's user avatar

1

Running this before the tensorflow installation solved it for me:

pip install "pip>=19"

As the tensorflow‘s system requirements states:

pip 19.0 or later

answered Feb 19, 2020 at 13:30

EliadL's user avatar

EliadLEliadL

5,8472 gold badges22 silver badges40 bronze badges

For version TensorFlow 2.2:

  1. Make sure you have python 3.8

try:
python --version

or
python3 --version

or
py --version

  1. Upgrade the pip of the python which has version 3.8

try:
python3 -m pip install --upgrade pip

or
python -m pip install --upgrade pip

or
py -m pip install --upgrade pip

  1. Install TensorFlow:

try:
python3 -m pip install TensorFlow

or python -m pip install TensorFlow

or py -m pip install TensorFlow

  1. Make sure to run the file with the correct python:

try:
python3 file.py

or python file.py

or py file.py

answered Jul 16, 2020 at 10:43

Trake Vital's user avatar

Trake VitalTrake Vital

9298 silver badges18 bronze badges

1

1.Go to https://www.tensorflow.org/install/pip website and look if the version you are using support the Tensorflow. some latest version does not support Tesnsorflow. until Tensorflow releases its latest version for that Python version.

  1. you must have 64 bit python installed

  2. have latest version of pip installed
    pip install —upgrade pip

answered Nov 8, 2020 at 12:33

mukesh yadav's user avatar

using pip install tensorflow --user did it for me

answered Sep 9, 2021 at 0:47

MoFoLuWaSo's user avatar

MoFoLuWaSoMoFoLuWaSo

1,1991 gold badge5 silver badges6 bronze badges

Tensorflow seems to need special versions of tools and libs.
Pip only takes care of python version.

To handle this in a professional way (means it save tremendos time for me and others)
you have to set a special environment for each software like this.

An advanced tool for this is conda.

I installed Tensorflow with this commands:

sudo apt install python3

sudo update-alternatives —install /usr/bin/python python /usr/bin/python3 1

sudo apt install python3-pip

sudo apt-get install curl

curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh > Miniconda3-latest-Linux-x86_64.sh

bash Miniconda3-latest-Linux-x86_64.sh

yes

source ~/.bashrc

  • installs its own phyton etc

nano .bashrc

  • maybe insert here your proxies etc.

conda create —name your_name python=3

conda activate your_name

conda install -c conda-forge tensorflow

  • check everything went well

python -c «import tensorflow as tf; tf.enable_eager_execution(); print(tf.reduce_sum(tf.random_normal([1000, 1000])))»

PS: some commands that may be helpful
conda search tensorflow

https://www.tensorflow.org/install/pip

uses virtualenv. Conda is more capable. Miniconda ist sufficient; the full conda
is not necessary

answered Apr 5, 2019 at 7:33

Bodo's user avatar

BodoBodo

264 bronze badges

use python version 3.6 or 3.7 but the important thing is you should install the python version of 64-bit.

answered Feb 19, 2020 at 13:58

Jasbin Karki's user avatar

In case you are using Docker, make sure you have

FROM python:x.y.z

instead of

FROM python:x.y.z-alpine.

answered Oct 11, 2020 at 14:56

DSchlingel's user avatar

This issue also happens with other libraries such as matplotlib(which doesn’t support Python > 3.9 for some functions) let’s just use COLAB.

answered May 12, 2021 at 1:35

krenerd's user avatar

krenerdkrenerd

7014 silver badges20 bronze badges

Slightly different issue for me but I will still post an answer here. tensorflow package is working, but not tflite-runtime.

pip install --extra-index-url https://google-coral.github.io/py-repo/ tflite-runtime==2.5.0

answered May 12, 2021 at 3:58

Michael Ribbons's user avatar

Michael RibbonsMichael Ribbons

1,6401 gold badge16 silver badges25 bronze badges

I had this problem on my macOS (with M1 Pro) even with the latest 64-bit Python and the latest pip installed. This is how I’ve solved it. Try to run:

pip install tensorflow-macos

If you will get the error ending like this (like I did)…

...
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

…then simply run:

pip install --default-timeout=100 tensorflow-macos

answered Jan 15 at 20:09

Przemek Baj's user avatar

Przemek BajPrzemek Baj

3662 gold badges4 silver badges17 bronze badges

I solved the same problem with python 3.7 by installing one by one all the packages required

Here are the steps:

  1. Install the package
  2. See the error message:

    couldn’t find a version that satisfies the requirement — the name of the module required

  3. Install the module required.
    Very often, installation of the required module requires the installation of another module, and another module — a couple of the others and so on.

This way I installed more than 30 packages and it helped. Now I have tensorflow of the latest version in Python 3.7 and didn’t have to downgrade the kernel.

RobC's user avatar

RobC

21.8k20 gold badges66 silver badges75 bronze badges

answered Apr 6, 2020 at 10:44

Alex Ivanov's user avatar

Alex IvanovAlex Ivanov

6357 silver badges17 bronze badges

Buy Me A Coffee

Hi!

Ok, I’ll write this down. I face this issue from time to time, and then after some searching and reading, I found the solution (again!) and I realize I’ve been done this before.

So, I’m installing Tensorflow on Windows with the amazing single command

# Requires the latest pip
pip install --upgrade pip
# Current stable release for CPU and GPU
pip install tensorflow

And then I get this error

ERROR: Could not find a version that satisfies the requirement tensorflow (from versions: none) 
ERROR: No matching distribution found for tensorflow

error installing tensor flow on windows

So, I decided to see what’s happened and I realize that I only have installed Python 3.8. And there is no official TF version for Python 3.8. So, I need to downgrade Python to 3.7.

Time to install earlier Python version

python current version 3.7.6

and then, try to install TensorFlow again. Now, it’s installing

installing tensorflow with current python version

and after installation, test current TF version

tensorflow installed and tested on windows terminal

So, remember: Using the latest Python version, does not warranty to have all the desired packed up to date. Specially with TensorFlow.

Happy coding!

Greetings

El Bruno

More posts in my blog ElBruno.com.


References

  • Install TensorFlow 2
  • Download Python

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.

TensorFlow 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:

  1. Right-click on My Computer and afterward click on Properties button.
    Choose Properties
  2. 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
  3. 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
  4. 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)]
  5. 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.

Photo of Kevin Arrows

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.

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]

Issue

I installed the latest version of Python (3.6.4 64-bit) and the latest version of PyCharm (2017.3.3 64-bit). Then I installed some modules in PyCharm (Numpy, Pandas, etc), but when I tried installing Tensorflow it didn’t install, and I got the error message:

Could not find a version that satisfies the requirement TensorFlow (from versions: )
No matching distribution found for TensorFlow.

Then I tried installing TensorFlow from the command prompt and I got the same error message.
I did however successfully install tflearn.

I also installed Python 2.7, but I got the same error message again. I googled the error and tried some of the things which were suggested to other people, but nothing worked (this included installing Flask).

How can I install Tensorflow? Thanks.

Solution

As of October 2020:

  • Tensorflow only supports the 64-bit version of Python

  • Tensorflow only supports Python 3.5 to 3.8

So, if you’re using an out-of-range version of Python (older or newer) or a 32-bit version, then you’ll need to use a different version.

Answered By — David Prun

Sometimes you get an error when you’re trying to install a Python package
using pip. It looks like this:

Could not find a version that satisfies the requirement (from versions:)
No matching distribution found for

Some probable reasons for this error are:

  1. PyPI server isn’t responding to your requests. It can happen either because
    the PyPI server is down or because it has blacklisted your IP address. This
    happened to me once when I was trying installing packages on a server.
    This can be fixed by using a proxy with pip. See the solution below.

  2. You’re running an older pip (especially on Mac). This can be fixed by
    upgrading your pip.
    See this post on Stack Overflow.
    Thanks to Anupam Jain who pointed this in a comment.

  3. The package you’re trying to install is not available for your Python version.

  4. The package is not available for your operating system. This is a rare case
    and only happens when the package is not pure-Python, i.e. it’s been
    partially written in C or Cython. Such a package needs to be compiled for
    every operating system (Windows/Mac/Linux) and architecture (32-bit/64-bit).
    Suppose a package has only been compiled for Windows 64-bit, then you’ll get
    this error if you try to install it on Windows 32-bit, or any other
    OS.

  5. The package is not present on PyPI server. In this case pip will not work. So
    you’ll have to download and install the package manually from Github or wherever
    it is available.

Solution¶

I had this issue because PyPI server had blacklisted the IP
of my hosting provider, the obvious solution was to make pip install via a proxy.

But to see if that’s also the case with you, you can test it like this:

$ curl https://pypi.org

The requestors Network has been blacklisted due to excessive request volume. 
If you are a hosting customer, please contact your hosting company's support. 
If you are the hosting company, please contact infrastructure-staff@python.org to resolve

If you see the message similar to above, that means your IP has also been
blacklisted by https://pypi.org.

If you don’t see this message then the reason for the pip error could be that you’re using
an older version. See this post on Stack Overflow
for a solution.

Anyways, this can be fixed by using a proxy with pip.

Supplying a proxy address to pip is easy:

$ pip install -r requirements.txt --proxy address:port

Above, address and port are IP address and port of the proxy.

To find proxies, just search Google for proxy list.

Other things that I tried¶

These are some other things that I tried to get rid of this issue.
Although they didn’t work for me, but they might work for you.

  1. Changing DNS resolver of my server.
    This makes sense if your server’s DNS resolver can’t find PyPI servers.
  2. Reconfiguring SSL, reinstalling CA certificates.
    This makes sense if you don’t have updated CA certificates which are used by
    PyPI servers.
  3. Downloading packages using wget.
    This is an alternative way to install Python packages. Download them via wget
    and then install them using python setup.py install. In my case, the server was
    blacklisted by PyPI so I was getting a 403 Forbidden error.
  4. Downloading packages using curl.
    Alternative to wget. In my case I didn’t get a 403 error but rather it just
    created invalid tarball files, instead of actually downloading them.
  5. Downloading packages using git or hg.
    If your desired packages have git or hg repositories that you can clone, this
    is a good workaround.

Понравилась статья? Поделить с друзьями:
  • Error could not find a version that satisfies the requirement requirements txt from versions none
  • Error could not find a version that satisfies the requirement requests from versions none
  • Error could not find a version that satisfies the requirement request from versions none
  • Error could not find a version that satisfies the requirement pywin32 from versions none
  • Error could not find a version that satisfies the requirement pyside6 from versions none