Issue installing Tensor Flow

Hello! I am trying to install Tensor FLow, but I am receiving this error:

Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [23 lines of output]
      Traceback (most recent call last):
        File "C:\Users\daeg2\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\daeg2\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\daeg2\AppData\Local\Programs\Python\Python311-32\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\daeg2\AppData\Local\Temp\pip-build-env-6nb__wfg\overlay\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\daeg2\AppData\Local\Temp\pip-build-env-6nb__wfg\overlay\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
          self.run_setup()
        File "C:\Users\daeg2\AppData\Local\Temp\pip-build-env-6nb__wfg\overlay\Lib\site-packages\setuptools\build_meta.py", line 516, in run_setup
          super().run_setup(setup_script=setup_script)
        File "C:\Users\daeg2\AppData\Local\Temp\pip-build-env-6nb__wfg\overlay\Lib\site-packages\setuptools\build_meta.py", line 318, in run_setup
          exec(code, locals())
        File "<string>", line 35, in <module>
        File "C:\Users\daeg2\AppData\Local\Programs\Python\Python311-32\Lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 2601: character maps to <undefined>
      [end of output]
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.

I already run python.exe -m pip install --upgrade pip because the error included it before, but it was not solved. Does anyone know how can I solve it?
Thank you in advance for your help!
Best,
David

The problem is that you are using 32-bit Python. Tensorflow only provides prebuilt binaries for 64-bit Python, so pip is trying to build tensorflow itself. This is highly non-trivial.

If you want to use tensorflow on Windows you must use 64-bit Python.

1 Like