python - 在本地安装 jupyter 后,我无法运行 jupyter notebook

标签 python linux pip jupyter-notebook jupyter

在 linux redhat 上: 我尝试在本地安装 jupyter:

$ pip install jupyter --user

似乎一切都已正确安装......

但是 - 我不能运行 jupyter notebook,也不能运行 ~/.local/bin/jupyter notebook 为什么?

安装...

$ pip install jupyter --user Collecting jupyter Using cached jupyter-1.0.0-py2.py3-none-any.whl Requirement already satisfied: ipywidgets in ~/.local/lib/python2.7/site-packages (from jupyter) Requirement already satisfied: notebook in ~/.local/lib/python2.7/site-packages (from jupyter) Requirement already satisfied: ipykernel in ~/.local/lib/python2.7/site-packages (from jupyter) Requirement already satisfied: qtconsole in ~/.local/lib/python2.7/site-packages (from jupyter) Requirement already satisfied: jupyter-console in ~/.local/lib/python2.7/site-packages (from jupyter) Requirement already satisfied: nbconvert in ~/.local/lib/python2.7/site-packages (from jupyter) Requirement already satisfied: traitlets>=4.2.1 in ~/.local/lib/python2.7/site-packages (from ipywidgets->jupyter) Requirement already satisfied: ipython>=4.0.0 in ~/.local/lib/python2.7/site-packages (from ipywidgets->jupyter) Requirement already satisfied: widgetsnbextension>=1.2.6 in ~/.local/lib/python2.7/site-packages (from ipywidgets->jupyter) Requirement already satisfied: tornado>=4 in ~/.local/lib/python2.7/site-packages (from notebook->jupyter) Requirement already satisfied: terminado>=0.3.3; sys_platform != "win32" in ~/.local/lib/python2.7/site-packages (from notebook->jupyter) Requirement already satisfied: jupyter-core in ~/.local/lib/python2.7/site-packages (from notebook->jupyter) Requirement already satisfied: jinja2 in ~/.local/lib/python2.7/site-packages (from notebook->jupyter) Requirement already satisfied: ipython-genutils in ~/.local/lib/python2.7/site-packages (from notebook->jupyter) Requirement already satisfied: nbformat in ~/.local/lib/python2.7/site-packages (from notebook->jupyter) Requirement already satisfied: jupyter-client in ~/.local/lib/python2.7/site-packages (from notebook->jupyter) Requirement already satisfied: pygments in ~/.local/lib/python2.7/site-packages (from qtconsole->jupyter) Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.0 in ~/.local/lib/python2.7/site-packages (from jupyter-console->jupyter) Requirement already satisfied: mistune!=0.6 in ~/.local/lib/python2.7/site-packages (from nbconvert->jupyter) Requirement already satisfied: entrypoints in ~/.local/lib/python2.7/site-packages (from nbconvert->jupyter) Requirement already satisfied: decorator in ~/.local/lib/python2.7/site-packages (from traitlets>=4.2.1->ipywidgets->jupyter) Requirement already satisfied: enum34; python_version == "2.7" in ~/.local/lib/python2.7/site-packages (from traitlets>=4.2.1->ipywidgets->jupyter) Requirement already satisfied: six in ~/.local/lib/python2.7/site-packages (from traitlets>=4.2.1->ipywidgets->jupyter) Requirement already satisfied: setuptools>=18.5 in ~/.local/lib/python2.7/site-packages (from ipython>=4.0.0->ipywidgets->jupyter) Requirement already satisfied: backports.shutil-get-terminal-size; python_version == "2.7" in ~/.local/lib/python2.7/site-packages (from ipython>=4.0.0->ipywidgets->jupyter) Requirement already satisfied: simplegeneric>0.8 in ~/.local/lib/python2.7/site-packages (from ipython>=4.0.0->ipywidgets->jupyter) Requirement already satisfied: pickleshare in ~/.local/lib/python2.7/site-packages (from ipython>=4.0.0->ipywidgets->jupyter) Requirement already satisfied: pexpect; sys_platform != "win32" in ~/.local/lib/python2.7/site-packages (from ipython>=4.0.0->ipywidgets->jupyter) Requirement already satisfied: pathlib2; python_version == "2.7" or python_version == "3.3" in ~/.local/lib/python2.7/site-packages (from ipython>=4.0.0->ipywidgets->jupyter) Requirement already satisfied: backports.ssl-match-hostname in ~/.local/lib/python2.7/site-packages (from tornado>=4->notebook->jupyter) Requirement already satisfied: backports-abc>=0.4 in ~/.local/lib/python2.7/site-packages (from tornado>=4->notebook->jupyter) Requirement already satisfied: certifi in ~/.local/lib/python2.7/site-packages (from tornado>=4->notebook->jupyter) Requirement already satisfied: singledispatch in ~/.local/lib/python2.7/site-packages (from tornado>=4->notebook->jupyter) Requirement already satisfied: ptyprocess in ~/.local/lib/python2.7/site-packages (from terminado>=0.3.3; sys_platform != "win32"->notebook->jupyter) Requirement already satisfied: MarkupSafe in ~/.local/lib/python2.7/site-packages (from jinja2->notebook->jupyter) Requirement already satisfied: jsonschema!=2.5.0,>=2.0 in ~/.local/lib/python2.7/site-packages (from nbformat->notebook->jupyter) Requirement already satisfied: pyzmq>=13 in ~/.local/lib/python2.7/site-packages (from jupyter-client->notebook->jupyter) Requirement already satisfied: wcwidth in ~/.local/lib/python2.7/site-packages (from prompt-toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter) Requirement already satisfied: configparser>=3.5; python_version == "2.7" in ~/.local/lib/python2.7/site-packages (from entrypoints->nbconvert->jupyter) Requirement already satisfied: functools32; python_version == "2.7" in ~/.local/lib/python2.7/site-packages (from jsonschema!=2.5.0,>=2.0->nbformat->notebook->jupyter) Installing collected packages: jupyter Successfully installed jupyter-1.0.0

最佳答案

先设置两个变量,其CMD命令如下: 设置 PYSPARK_DRIVER_PYTHON_OPTS=笔记本 设置 PYSPARK_DRIVER_PYTHON=ipython 现在使用命令 pyspark 运行 pyspark,这将打开 8888(默认)端口,jupyter 运行启动的 sparkContext。

关于python - 在本地安装 jupyter 后,我无法运行 jupyter notebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40588398/

相关文章:

python - 为什么即使已经安装了 Scrapy 模块,python 也会抛出 "ImportError: No module named linkextractor"?

python-3.x - 安装 github 子模块时,诗歌安装失败并显示 [CalledProcessError]

python - 如何获取 XGBClassifier 的预测 p 值?

linux - 管道到日志文件命令后 Shell 脚本不退出

python - fatal error C1083 : Cannot open include file: 'basetsd.h'

python - 如何管理大文件?

c - 如何获取 SD 卡事件的通知?

python - 如何通过键连接两个RDD?

Python:正确引发异常

python - 无论如何,在退出时关闭sqlite3数据库