【发布时间】:2022-01-03 05:36:03
【问题描述】:
我正在使用装有最新 Mac OS 12.1 的新 M1 Pro,但在安装 tensorflow 时遇到了问题。
我使用以下方法安装了 Miniforge3:
chmod +x ~/Downloads/Miniforge3-MacOSX-arm64.sh
sh ~/Downloads/Miniforge3-MacOSX-arm64.sh
source ~/miniforge3/bin/activate
我已经创建了一个环境并激活了它。
然后我尝试了
conda install -c apple tensorflow-deps
这是返回的内容:
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
PackagesNotFoundError: The following packages are not available from current channels:
- tensorflow-deps
Current channels:
- https://conda.anaconda.org/apple/osx-64
- https://conda.anaconda.org/apple/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
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.
Note: you may need to restart the kernel to use updated packages.
conda info
active env location : /Users/andrewli/tensorflow-test/env
shell level : 2
user config file : /Users/andrewli/.condarc
populated config files : /Users/andrewli/.condarc
conda version : 4.10.3
conda-build version : 3.21.5
python version : 3.9.7.final.0
virtual packages : __osx=10.16=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/andrewli/opt/anaconda3 (writable)
conda av data dir : /Users/andrewli/opt/anaconda3/etc/conda
conda av metadata url : None
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/andrewli/opt/anaconda3/pkgs
/Users/andrewli/.conda/pkgs
envs directories : /Users/andrewli/opt/anaconda3/envs
/Users/andrewli/.conda/envs
platform : osx-64
user-agent : conda/4.10.3 requests/2.26.0 CPython/3.9.7 Darwin/21.2.0 OSX/10.16
UID:GID : 501:20
netrc file : None
offline mode : False
有没有人有同样的问题和解决这个问题的建议?
【问题讨论】:
-
详细信息显示您正在仿真 (x86_64) 模式下运行 Anaconda3。你以前安装过 Anaconda 吗?
-
@merv 是的,我安装了 anaconda。我应该删除 Anaconda 以安装 tensorflow(然后重新安装)吗?如果是这样,我想我将运行 Mac 附带的 python 2.7.18,它似乎很旧并且缺少一些基本的东西(比如 pip)
-
比这要复杂一些。你在运行什么终端? Anaconda Prompt 仅支持 Rosetta(x86_64 仿真); Miniforge osx-arm64 应该从运行本地 shell 应用程序的 Mac 终端运行(通常是
zsh)。 -
这可能是相关的背景阅读:anaconda.com/blog/apple-silicon-transition.
标签: macos tensorflow conda apple-m1