Tensorflow ошибка при установке

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]

You need to use the right version of Python and pip.

On Windows 10, with Python 3.6.X version I was facing the same problem, then after checking deliberately I noticed I had the Python-32 bit installation on my 64 bit machine. Remember TensorFlow is only compatible with 64bit installation of Python, not the 32 bit version of Python

Image

If we download Python from python.org, the default installation would be 32 bit. So we have to download the 64 bit installer manually to install Python 64 bit. And then add below to PATH environment.

C:UsersAppDataLocalProgramsPythonPython36
C:UsersAppDataLocalProgramsPythonPython36Scripts

Then run gpupdate /Force on command prompt. If the Python command doesn’t work for 64 bit then restart your machine.

Then run python on command prompt. It should show 64 bit.

C:UsersYOURNAME>python
Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

Then run below command to install tensorflow CPU version (recommended)

pip3 install --upgrade tensorflow

October 2020 update:

Tensorflow now supports Python 3.5.x through Python 3.8.x, but you still have to use a 64-bit version.

If you need to run multiple versions of Python on the same machine, you can use a virtual environment to help manage them.

Does anyone know how to properly install tensorflow on Windows?

I’m currently using Python 3.7 (also tried with 3.6) and every time I get the same «Could not find a version that satisfies the requirement tensorflow-gpu (from versions: )
No matching distribution found for tensorflow-gpu» error

I tried installing using pip and anaconda, both don’t work for me.


Found a solution, seems like Tensorflow doesn’t support versions of python after 3.6.4. This is the version I’m currently using and it works.

asked Jul 20, 2018 at 10:26

3

Tensorflow or Tensorflow-gpu is supported only for 3.5.X versions of Python. Try installing with any Python 3.5.X version. This should fix your problem.

answered Aug 6, 2018 at 11:07

Prometheus's user avatar

PrometheusPrometheus

1,12814 silver badges21 bronze badges

1

Here is what i did to get tensorflow working with windows.

Download python 3.7.0 (64 bit from Python Releases for Windows) Install it and check python version by running below command in cmd:

python --version

Python 3.7.0

Then run below command to upgrade pip to latest

python -m pip install --upgrade pip

Now install tensorflow using pip

pip install tensorflow

That’s it you have installed tensorflow on windows. Below image shows what happens when you type above commands

link for tensorflow for python 3x

https://pypi.org/project/tensorflow/#files

tensorflow-1.14.0-cp37-cp37m-win_amd64.whl (68.3 MB)

adiga's user avatar

adiga

34.1k9 gold badges60 silver badges82 bronze badges

answered Jul 4, 2019 at 8:41

M_Munam's user avatar

Unfortunately, tensorflow can’t installed correctly on python 3.7 and last version of anaconda: so, the best and effective way to do this is to downgrade your python to python 3.6.7 use the next steps:
1- download the latest version of Anaconda
use Anaconda prompt with administrator privilege
2- conda install python=3.6.7 (need a long time)
3-conda install tensorflow
4- conda install keras
5- conda install numpy

enter image description here

answered Feb 21, 2019 at 7:57

Tamer Farrag's user avatar

1

  • Check whether you have a CPU or GPU, if your system doesn’t have GPU, then it will generate error.

  • If you are going to install tensorflow using Windows command prompt (assuming python is already installed), then just run the following command. Go to the root directory, preferably ‘C:’ drive then run

    • For GPU- pip3 install --upgrade tensorflow-gpu

    • For CPU- pip3 install --upgrade tensorflow

  • If you are using Anaconda, then open Anaconda Navigator->Environments->Select ‘All’ from the drop down menu and then search TensorFlow. If you are using CPU, then select ‘tensorflow’, else for GPU select ‘tensorflow-gpu’. Then click Apply.

Screenshot of Anaconda Navigator-In case you are not familiar where to look.

answered Jul 20, 2018 at 10:48

Madhav Agarwal's user avatar

  1. Download the latest version of anaconda from here
    I’m using Anaconda 2019.03 for Windows Installer, Python 3.7, 64-bit
  2. Upgrade pip as:

    python -m pip install —upgrade pip

  3. (a). Install tensorflow using pip3 as:

    pip3 install —user —upgrade tensorflow

    (b). If you installed anaconda with all users mode. The above
    command will become:

    pip3 install —upgrade tensorflow

  4. Check installation success as:

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

answered Jul 17, 2019 at 17:58

DevLoverUmar's user avatar

DevLoverUmarDevLoverUmar

11.2k11 gold badges67 silver badges95 bronze badges

As of Feb 2020, Tensorflow is not supported for Python 3.8+

To make it work install a virtualenv w/ Python 3.7 from here: https://www.python.org/downloads/windows/

answered Feb 19, 2020 at 5:45

DankMasterDan's user avatar

DankMasterDanDankMasterDan

1,8284 gold badges22 silver badges34 bronze badges

Tensorflow pip installation for python version 3.5-3.8 requires pip 19.0 or later, as mentioned in the official tensorflow documentation.

Here is a part of this documentation:

System requirements

  • Python 3.5–3.8

    Python 3.8 support requires TensorFlow 2.2 or later.

  • pip 19.0 or later (requires manylinux2010 support)

Try running pip install --upgrade pip inside your python3 virtualenv.

Community's user avatar

answered Jun 16, 2020 at 6:13

workaround's user avatar

workaroundworkaround

4986 silver badges18 bronze badges

You mentioned Anaconda. Do you run your python through there?

If so check in Anaconda Navigator —> Environments, if your current environment have got tensorflow installed.
If not, install tensorflow and run from that environment.
Should work.

answered Jul 20, 2018 at 10:31

Jan Santora's user avatar

I had the same problem that yours, happened that I had python at version 3.7. So for installing the Tensorflow with the GPU support I used:

py -3.6 -m pip install tensorflow-gpu

at a Virtualenv ambient. You can see the documentation behind on this website:

https://docs.python.org/3/installing/index.html

I think that this solution is better than downgrade the Python version.

answered Sep 25, 2018 at 0:14

Matheus Gouvea's user avatar

Actually the easiest way to install tensorflow is:
install python 3.5 (not 3.6 or 3.7) you can check wich version you have by typing «python» in the cmd.

When you install it check in the options that you install pip with it and you add it to variables environnement.
When its done just go into the cmd and tipe «pip install tensorflow»

It will download tensorflow automatically.

If you want to check that it’s been installed type «python» in the cmd then some that «>>>» will appear, then you write «import tensorflow» and if there’s no error, you’ve done it!

answered Nov 6, 2018 at 17:32

Nicolas Schmid's user avatar

As of November 2018, Tensorflow is not supported for Python 3.6.4+

What to do:

Downgrade Anaconda’s Python from 3.7 or 3.6.5+ to 3.6.4

a. Open Command Prompt, find your Anaconda environment, and change your directory

  • where anaconda or where python
    • Example path and cd:
    • cd C:ProgramDataAnaconda3bin

b. While in anaconda3/bin in your Command Prompt, source activate your base Anaconda environment

  • source activate

c. In your Command Prompt, downgrade your base Anaconda environment

  • conda install python=3.6.4

d. Install Tensorflow

  • pip install tensorflow

Further reading:
http://docs.anaconda.com/anaconda/user-guide/faq/#how-do-i-get-the-latest-anaconda-with-python-3-5

answered Nov 22, 2018 at 4:41

dialogues.ai's user avatar

As of July 2019, I have installed it on python 3.7.3 using py -3 -m pip install tensorflow-gpu
py -3 in my installation selects the version 3.7.3.
The installation can also fail if the python installation is not 64 bit. Install a 64 bit version first.

answered Jul 9, 2019 at 1:15

Patrick Mutuku's user avatar

This is Manas working as a intern in COE-AI lab(CET,BBSR) under tech machindra.

We faced same error. After a little research, we found that there is a glitch in anaconda python 3.7. It does not install tensorflow through pip or conda install command, even if it does..produces same error..

Here is the solution, install conda environment for python=3.6:

  1. go to the directory where conda is installed
  2. cd anaconda3
  3. conda create -n tensorflow python=3.6
  4. conda activate tensorflow
  5. conda install tensorflow python=3.6
  6. python
  7. Import tensorflow.

steps

Do it twice:
enter image description here
enter image description here

MartenCatcher's user avatar

answered Jan 21, 2020 at 10:42

Manu Kowsik 1's user avatar

-> Not able to install tensorflow , Here I have a solution that worked for me

Step 1 :
— Check version of python(3.7.3)
— Python must be 64 bit Otherwise tensorflow never ever going to be installed it defiitely gives Error.

Step 2 :

pip install tensorflow==2.0.0

Step 3 :

pip install sklearn==0.0
pip install Pillow==8.0.1
pip install h5py==2.10.0

Step 4 :

pip install keras==2.3.1

Now its ready to use.

Ahmad Anis's user avatar

Ahmad Anis

2,2923 gold badges24 silver badges53 bronze badges

answered Dec 27, 2020 at 15:18

NiteshCoder's user avatar

1

In Windows 10 with Python 3.8.5, first i tried directly then it was giving following error:

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

Then i installed successfully in virtual environment shown below:

PS E:udemyfull_stack_web_aideeplearning> .myenvScriptsactivate
(myenv) PS E:udemyfull_stack_web_aideeplearning> pip install tensorflow
Collecting tensorflow ###
Downloading tensorflow-2.4.1-cp38-cp38-win_amd64.whl (370.7 MB) 

Use virtual environment using:

python -m venv myenv
.myenvScriptsactivate

answered Feb 9, 2021 at 17:52

Subhasish Paul's user avatar

Not Enabling the Long Paths can be the potential problem.To solve that,

Steps include:

  1. Go to Registry Editor on the Windows Laptop

  2. Find the key «HKEY_LOCAL_MACHINE»->»SYSTEM»->»CurrentControlSet»->
    «File System»->»LongPathsEnabled» then double click on that option and change the value from 0 to 1.

3.Now try to install the tensorflow it will work.

answered Jul 17, 2021 at 15:01

tarun mahendra's user avatar

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Pick a username
Email Address
Password

By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.

Already on GitHub?
Sign in
to your account

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 Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Понравилась статья? Поделить с друзьями:
  • Temp1 bin ошибка gta 5
  • Temp moteur ошибка ситроен с4 excessive
  • Temp moteur excessive ошибка citroen c4
  • Telnet ошибка порт 23
  • Telnet ошибка подключения