0

According to the docs, Tensorflow 2 is compatible with Python versions 3.7-3.10. However the python version and architecture seems to change after installing tensorflow. Can someone explain why?

I'm asking because I'm having other installation issues using pipenv and am trying to debug and isolate the problem.

$ conda create -n conda-tf-ard-pyd; conda activate conda-tf-ard-pyd

$ arch
arm64

$ python3 -c "import platform, sys; print(sys.version, '\n', platform.architecture(), '\n', platform.machine())"
3.8.9 (default, Apr 13 2022, 08:48:06)
[Clang 13.1.6 (clang-1316.0.21.2.5)]
 ('64bit', '')
 arm64

Then, I run: conda install tensorflow. Note the python version and arch changes:

$ arch
arm64

$ python3 -c "import platform, sys; print(sys.version, '\n', platform.architecture(), '\n', platform.machine())"
3.7.13 (default, Mar 28 2022, 07:24:34)
[Clang 12.0.0 ]
 ('64bit', '')
 x86_64

Edit: Additionally, I tried a fresh install and included few additional packages (iPython, pandas) which ups my python version to 3.10. When I get to installing TF, I get this error:

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - tensorflow -> python[version='2.7.*|3.7.*|3.6.*|3.5.*']

Your python: python=3.10

Again, this doensn't make sense given the TF docs claim it supports 3.10. Ideas?

Peter
  • 1,065
  • 14
  • 29
  • Have you tried specifying `python=` at the end of the `conda install`? – Saddy Jun 14 '22 at 13:27
  • 1
    What does `clang` have to do with the question? Also, [Conda doesn't have native Python 3.7](https://stackoverflow.com/a/70219965/570918) builds for **osx-arm64**. – merv Jun 14 '22 at 14:04
  • @merv It was for something else, I'll remove. Also updating the question with more info – Peter Jun 14 '22 at 14:42
  • Consider specifying all packages at environment creation time (you can give multiple packages in `conda create`). [YAML environment definitions](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-file-manually) are particularly useful in this regard. – merv Jun 14 '22 at 15:20

0 Answers0