[英]Installing spyder for python3 on mac
我很沮丧。 看来我不了解此安装的基本概念,也找不到答案。
如标题所示,我想在Mac上安装适用于python3的spyder。 由于我仅单击某些位置就找不到任何简单的安装。
在Mac上预装了python 2.7,我已经安装了python3,这非常简单。
因此,我首先在命令行中输入sudo easy_install pip
来安装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
拿但业
听起来好像您做对了事情,但您也做了其他事情。
pip3 install spyder # Installs Spyder for python 3
如果您想知道Spyder应用程序在哪里,请使用which命令。
which spyder3 # This will give you the path to the application file.
如果要使用Spyder,请输入spyder3,然后输入要编辑的文件。
spyder3 myfilename.py # Opens (creates if needed) myfilename.py in Spyder.
根据问题的严重程度,您可能只想重新安装Spyder,或者您可能会想在Mac上使用Homebrew之类的工具清理python3安装。
正如您在Github上阅读的那样,Anaconda最近停止了对Spyder的财务支持,并且列出了一些其他安装方法,如果您不打算使用Anaconda或PIP,可能要使用这些方法。
祝你好运!
( 这里是Spyder开发人员 )
因此,我首先在命令行中输入sudo easy_install pip来安装pip。
请完全避免使用此路线。 永远不要将任何东西安装到系统Python中(尤其是在macOS中),因为您可能会冒险完全破坏系统。 那是因为操作系统使用Python运行某些东西,所以最好不要使用它。
在macOS中安装Spyder的最简单方法是下载Anaconda并安装它。 Anaconda附带了所有Spyder依赖项,以及最重要的科学Python库可供使用。
其他选项是Homebrew或MacPorts,但Anaconda确实是最简单的选项。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.