gpt4 book ai didi

hadoop - 设置Python虚拟环境启动Jupyter Notebook gaierror:[Errno -2]名称或服务未知

转载 作者:行者123 更新时间:2023-12-02 20:31:15 26 4
gpt4 key购买 nike

当我尝试在虚拟环境中启动Jupyter笔记本时,出现以下错误-.gaierror:[Errno -2]名称或服务未知

虚拟环境-wget https://pypi.python.org/packages/source/v/virtualenv/virtualenv-12.0.7.tar.gz

Traceback (most recent call last):
File "/home/vraja/pyspark/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/home/vraja/pyspark/lib/python2.7/site-
packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/home/vraja/pyspark/lib/python2.7/site-
packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/home/vraja/pyspark/lib/python2.7/site-
packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/home/vraja/pyspark/lib/python2.7/site-
packages/notebook/notebookapp.py", line 1629, in initialize
self.init_webapp()
File "/home/vraja/pyspark/lib/python2.7/site-
packages/notebook/notebookapp.py", line 1379, in init_webapp
self.jinja_environment_options,
File "/home/vraja/pyspark/lib/python2.7/site-
packages/notebook/notebookapp.py", line 158, in __init__
default_url, settings_overrides, jinja_env_options)
File "/home/vraja/pyspark/lib/python2.7/site-
packages/notebook/notebookapp.py", line 251, in init_settings
allow_remote_access=jupyter_app.allow_remote_access,
File "/home/vraja/pyspark/lib/python2.7/site-
packages/traitlets/traitlets.py", line 556, in __get__
return self.get(obj, cls)
File "/home/vraja/pyspark/lib/python2.7/site-
packages/traitlets/traitlets.py", line 535, in get
value = self._validate(obj, dynamic_default())
File "/home/vraja/pyspark/lib/python2.7/site-
packages/notebook/notebookapp.py", line 872, in _default_allow_remote
for info in socket.getaddrinfo(self.ip, self.port, 0,
socket.SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known
(pyspark)-sh-4.1$

最佳答案

您设置了配置文件变量吗?

请在配置文件中添加以下env变量。

导出PYSPARK_DRIVER_PYTHON = jupyter

导出PYSPARK_DRIVER_PYTHON_OPTS ='笔记本'

关于hadoop - 设置Python虚拟环境启动Jupyter Notebook gaierror:[Errno -2]名称或服务未知,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53233106/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com