安装

https://zh-v2.d2l.ai/chapter_installation/index.html

安装tensorflow 报错,请问要怎么处理呀?
:guitar:$ pip install tensorflow tensorflow-probability

Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple

ERROR: Could not find a version that satisfies the requirement tensorflow

ERROR: No matching distribution found for tensorflow

:guitar:$

Hi @jidom

Tensorflow 需要 Python 3.5 to 3.8,并且只支持 64-bit 版本。可以用以下命令再jupyter内检查:

python version:

!python --version

32-bit or 64-bit 版本:

import struct
print(struct.calcsize("P")*8)

hi@goldpiggy 我可能是下载了最新版本的miniconda(Miniconda3-py39_4.9.2-MacOSX-x86_64.sh),python是3.9版本的,我将minicoda3目录删除,重新安装了Miniconda3-latest-MacOSX-x86_64.sh,结果又报错了:
:guitar:$ conda activate d2l
Could not find conda environment: d2l
You can list all discoverable environments with conda info --envs.

:guitar:$ ~/miniconda3/bin/conda init
no change /Users/lingxin/miniconda3/condabin/conda
no change /Users/lingxin/miniconda3/bin/conda
no change /Users/lingxin/miniconda3/bin/conda-env
no change /Users/lingxin/miniconda3/bin/activate
no change /Users/lingxin/miniconda3/bin/deactivate
no change /Users/lingxin/miniconda3/etc/profile.d/conda.sh
no change /Users/lingxin/miniconda3/etc/fish/conf.d/conda.fish
no change /Users/lingxin/miniconda3/shell/condabin/Conda.psm1
no change /Users/lingxin/miniconda3/shell/condabin/conda-hook.ps1
no change /Users/lingxin/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change /Users/lingxin/miniconda3/etc/profile.d/conda.csh
no change /Users/lingxin/.bash_profile
No action taken.
:guitar:$ conda create --name d2l python=3.8 -y
Collecting package metadata (current_repodata.json): done
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed

PackagesNotFoundError: The following packages are not available from current channels:

  • python=3.8

Current channels:

To search for alternate channels that may provide the conda package you’re
looking for, navigate to

https://anaconda.org

and use the search bar at the top of the page.

Hi @jidom,

试一下 conda install python=3.8.5. 详细见:https://chris35wills.github.io/conda_python_version/