简体   繁体   English

在 macOS BIGsur 上设置 spyder 4.2.1 时遇到问题

[英]Trouble setting up spyder 4.2.1 on macOS BIGsur

i hope this question somehow fits in here.我希望这个问题以某种方式适合这里。 Short: Can't install Spyder 4.2.1 using anaconda.简短:无法使用 anaconda 安装 Spyder 4.2.1。 However, I can install stand alone Spyder 4.2.1 but then i don't know how to install packages as the terminal/pip won't find the python from the stand alone Spyder.但是,我可以安装独立的 Spyder 4.2.1,但是我不知道如何安装软件包,因为终端/pip 不会从独立的 Spyder 中找到 python。

long: Spyder 4.2.1 seems to be the first version that is supported on BIGsur. long:Spyder 4.2.1 似乎是 BIGsur 支持的第一个版本。 However, when I installed anaconda, it came with Spyder 4.1.5.但是,当我安装 anaconda 时,它附带了 Spyder 4.1.5。 I tried conda -update Spyder in the terminal and I got Spyder 4.2.0.我在终端中尝试了 conda -update Spyder,我得到了 Spyder 4.2.0。 This version is still super laggy and has high typing latency in the editor.这个版本仍然超级滞后,并且在编辑器中输入延迟很高。 Trying the same again shows latest version already installed.再次尝试相同显示已安装最新版本。 Same for trying: conda -update anaconda.尝试相同:conda -update anaconda。 Spyder4.2.1 was only released a few days ago. Spyder4.2.1 几天前才发布。 Is it possible it takes a while until anaconda supports it? anaconda 支持它是否可能需要一段时间? If so, how long would it take (days, weeks or months?).如果是这样,需要多长时间(几天、几周或几个月?)。 My google searches had no results regarding this.我的谷歌搜索没有关于此的结果。

Since 4.2.0 the Spyder developers recommend the stand alone installers, which I understand as using Spyder without anaconda.从 4.2.0 开始,Spyder 开发人员推荐使用独立安装程序,我理解为在没有 anaconda 的情况下使用 Spyder。 I installed Spyder 4.2.1 and the typing in the editor was indeed super smooth.我安装了 Spyder 4.2.1,在编辑器中输入确实超级流畅。 But now i couldn't properly install packages like pandas.但现在我无法正确安装 pandas 之类的软件包。 I also noticed that when i run spyder from anaconda the first line in the console indicates python 3.8 but when i run the stand alone spyder4.2.1 it says python 3.9.我还注意到,当我从 anaconda 运行 spyder 时,控制台中的第一行指示 python 3.8 但是当我运行独立的 spyder4.2.1 时,它显示 Z23EEEB4347BDD26BFC637EE9A3B755DD。 The terminal only "recognizes" the 3.8 version.终端仅“识别” 3.8 版本。 At least I can run Python3.8 in the Terminal but trying to run Python3.9 gives zsh: command not found error.至少我可以在终端中运行 Python3.8,但尝试运行 Python3.9 会给出 zsh: command not found 错误。 (when it comes to install packages, developers recommend conda again. But this only updates the built in Spyder packages not the stand alone Spyder... (在安装包时,开发者再次推荐 conda。但这只会更新内置的 Spyder 包,而不是独立的 Spyder ......

I realized the Python3.9 version is located in the spyder.app-file.我意识到 Python3.9 版本位于 spyder.app 文件中。 I am super new to macOS and was quiet surprised when i found out, that what i thought was a launching icon was also a directory.我是 macOS 的超级新手,当我发现我认为是启动图标的同时也是一个目录时,我感到非常惊讶。 Anyway using pip -install seems to only install packages for the python3.8 version.无论如何使用 pip -install 似乎只安装 python3.8 版本的软件包。 With --target I tried to install the package into the spyder.app directory.使用 --target 我尝试将 package 安装到 spyder.app 目录中。 Now I'm afraid it installs the wrong version of pandas.现在恐怕它安装了错误版本的 pandas。 In the terminal it said it installed pandas 0.24 which is quiet outdated.在终端中,它说它安装了 pandas 0.24,它已经过时了。 I have also Python 2.7 installed and I feel like the pandas version i got matches python2.7.我还安装了 Python 2.7,我觉得 pandas 版本与 python2.7 匹配。 So i tried to install the python3.9 version (using: python3.9 -m pip install), but since the terminal doesn't recognize this version it says command does not exist.所以我尝试安装python3.9版本(使用:python3.9 -m pip install),但由于终端无法识别此版本,它说命令不存在。

The message from Spyder after "import pandas" is around 100 lines, i copied the red highlighted ones: “import pandas”之后来自 Spyder 的消息大约 100 行,我复制了红色突出显示的:

ModuleNotFoundError: No module named 'pandas._libs.tslibs.base'
KeyError: 'pandas._libs.tslibs.conversion'
KeyError: 'pandas._libs.missing'
KeyError: 'pandas._libs.hashtable'
KeyError: 'pandas._libs.interval'

Has anyone installed Spyder 4.2.1 using anaconda or knows how to install packages for the stand alone version?有没有人使用 anaconda 安装 Spyder 4.2.1 或知道如何为独立版本安装软件包?

My current solution is to change spyders4.2.1 python environment to the python I installed seperately.我目前的解决方案是将 spyders4.2.1 python 环境更改为我单独安装的 python 环境。 Now I can install packages with pip install.现在我可以使用 pip install 来安装软件包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM