【发布时间】:2021-02-26 12:25:03
【问题描述】:
我在我的mac上下载了SageMath-9.2,但每次我都尝试使用笔记本
通过在我的终端上运行“sage -n jupyter”
我得到以下按摩:
Please wait while the Sage Jupyter Notebook server starts...
Traceback (most recent call last):
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/sage/repl/ipython_kernel/install.py", line 307, in have_prerequisites
from notebook.notebookapp import NotebookApp
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/notebook/notebookapp.py", line 66, in
from tornado import httpserver
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/site-packages/tornado/httpserver.py", line 29, in
import ssl
File "/Applications/SageMath-9.2.app/Contents/Resources/sage/local/lib/python3.8/ssl.py", line 98, in
import _ssl # if we can't import it, let the error propagate
ModuleNotFoundError: No module named '_ssl'
The Jupyter notebook requires ssl, even if you do not use https. Install the openssl development packages in your system and then rebuild Python (sage -f python3).
而且由于某种原因我也无法打开应用程序.....每次点击应用程序时都会出现一个小窗口:
Jupyter Server failed to start
For some reason the Jupyter server failed to start. Please check the log for clues, and have that information handy when asking for help.
我希望能得到一些帮助,这对我来说非常重要,因为我必须将 SageMath 用于我的大学项目.. 在此先感谢
【问题讨论】:
-
我尝试使用的 SageMath 版本是 9.2 ,我使用的是 Python 3.8.5
-
欢迎来到 Stack Overflow!您可以随时编辑您的问题。最好在问题本身中添加更多信息。
-
收到这个错误真的很奇怪。也许问题不是隐含的……“ssl”或“_ssl”模块都无法导入。我这样说是因为我刚刚在我的 Mac 上第一次安装了 Python 3.8,并且
import ssl和import _ssl直接开箱即用! - 我建议您检查这些导入是否适用于您尝试使用的 Python 版本。如果没有,也许您应该重新安装该版本或使用并可能安装另一个版本。 -
我使用Homebrew 安装了 3.8 和 3.9。我可以用 Homebrew 安装任何东西。它从来没有让我失望过。我不知道为什么这些包在或不在任何特定版本的 Python 中。事实上,我不能 100% 确定我的系统没有选择我以某种方式在全球范围内安装的
ssl库的一个版本。然而,我的经验是,每个 Python 安装在模块方面都是独立的。如果这是真的,那么我的 3.9 肯定带有这些模块,因为当这个问题出现时,我刚刚安装它并且还没有对它做任何事情。 -
我使用
pyenv来管理我所有的 Python 版本。如果您需要有关该工具的任何信息或帮助,我已经通过一些痛苦想出了一些关于它的事情,并且很乐意帮助您避免同样的事情。
标签: python macos jupyter-notebook sage