我很沮丧。看来我不了解此安装的基本概念,也找不到答案。
如标题所述,我想在Mac上安装适用于python3的spyder。由于我仅单击某些位置就找不到任何简单的安装。
在Mac上,python 2.7已预先安装,并且我已经安装了python3,这非常简单。
因此,我首先在命令行中pip
输入安装内容sudo easy_install pip
。然后,我跟随该站点的介绍,该站点基本上说要键入内容pip install -U spyder
,最后导致错误。我意识到我必须使用,pip3
因为我有两个python版本。为什么这里没有提到?无论如何,它奏效了-至少它没有触发错误。但是,现在我很困惑,应用程序在哪里?我现在如何使用spyder?
任何帮助表示赞赏。
编辑当我突然变成文件夹bin时,终端响应了,spyder3
但是结果是
Nathanaels-iMac:bin nathanaelskrepek$ spyder3
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/qtpy/__init__.py", line 148, in <module>
from PySide import __version__ as PYSIDE_VERSION # analysis:ignore
ModuleNotFoundError: No module named 'PySide'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/spyder3", line 11, in <module>
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spyder/app/start.py", line 144, in main
from spyder.app import mainwindow
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spyder/app/mainwindow.py", line 49, in <module>
requirements.check_qt()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/spyder/requirements.py", line 39, in check_qt
import qtpy
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/qtpy/__init__.py", line 154, in <module>
raise PythonQtError('No Qt bindings could be found')
qtpy.PythonQtError: No Qt bindings could be found
(Spyder开发人员在这里)
因此,我首先在命令行中输入sudo easy_install pip来安装pip。
请完全避免使用此路线。永远不要将任何东西安装到系统Python中(尤其是在macOS中),因为您可能会冒险破坏整个系统。那是因为操作系统使用Python运行某些事情,所以最好不要使用它。
在macOS中安装Spyder的最简单方法是下载Anaconda并安装它。Anaconda附带了所有Spyder依赖项,以及最重要的科学Python库可供使用。
其他选项是Homebrew或MacPorts,但Anaconda确实是最简单的选择。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句