应用程序 Spyder 启动可能产生错误 Mac M1 芯片

时间:2021-01-27 08:07:28

标签: tensorflow anaconda spyder apple-m1

嘿,亲爱的,我正在尝试在我的 anaconda 环境中启动 spyder,但我遇到了这个错误。

Application Spyder 启动可能产生错误 Mac M1 芯片

Traceback (most recent call last):
File "/Users/nawrozmohammadi/miniforge3/envs/tf24/bin/spyder", line 7, in 
from spyder.app.start import main
File "/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/spyder/app/start.py", line 35, in 
from spyder.utils.external import lockfile
File "/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/spyder/utils/external/lockfile.py", line 31, in 
from spyder.utils.programs import is_spyder_process
File "/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/spyder/utils/programs.py", line 30, in 
import psutil
File "/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/psutil/__init__.py", line 159, in 
from . import _psosx as _psplatform
File "/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/psutil/_psosx.py", line 15, in 
from . import _psutil_osx as cext
ImportError: dlopen(/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/psutil/_psutil_osx.cpython-38-darwin.so, 2): no suitable image found. Did find:
/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/psutil/_psutil_osx.cpython-38-darwin.so: mach-o, but wrong architecture
/Users/nawrozmohammadi/miniforge3/envs/tf24/lib/python3.8/site-packages/psutil/_psutil_osx.cpython-38-darwin.so: mach-o, but wrong architecture

**在我启动 spyder 之前,我通过这两种方式安装了 Tensorflow firstsecond 以及 Tensorflow 成功运行**

>>>import tensorflow as tf
>>>tf.__version__
'2.4.0-rc0'

我试过安装 pyqt 并安装

<块引用>

conda 更新 --all

.但没有任何效果

系统信息

康达版本:4.9.2

python 版本:3.8.6

平台:maOS BigSur 64

1 个答案:

答案 0 :(得分:0)

Anaconda 在 x86 (intel) 上运行,因此即使我在 m1 macbook air 上也遇到了很多问题。但是 miniconda 是专门为 arm64 芯片量身定做的。

因此尝试安装 miniconda 并使用 jupyternotebooks。

按照以下指南成功安装 tensorflow 和 Pycharm:

Installation of TensorFlow & Pytorch on M1 Macbooks