gpt4 book ai didi

python - Anaconda 错误启动 python 3 jupyter notebook

转载 作者:行者123 更新时间:2023-11-28 21:47:11 24 4
gpt4 key购买 nike

安装 Anaconda3.5 后尝试使用 jupyter 打开 python 3 notebook 时出现错误。 python 2 笔记本没有问题。这是错误

Failed to run command:
['/Users/sushmitroy/anaconda/envs/py35/bin/python', '-m', 'ipykernel', '-f', '/Users/sushmitroy/Library/Jupyter/runtime/kernel-64704aa3-3d05-4249-8ec2-8a9c98659538.json']
with kwargs:
{'stderr': None, 'cwd': '/Users/sushmitroy', 'stdin': -1, 'env': {'HOME': '/Users/sushmitroy', 'LOGNAME': 'sushmitroy', 'PWD': '/Users/sushmitroy', 'TERM': 'xterm-256color', 'SECURITYSESSIONID': '186a8', 'Apple_PubSub_Socket_Render': '/private/tmp/com.apple.launchd.EDDWkpkF2z/Render', 'XPC_SERVICE_NAME': '0', '__CF_USER_TEXT_ENCODING': '0x1F5:0x0:0x0', 'XPC_FLAGS': '0x0', 'SHELL': '/bin/bash', 'JPY_PARENT_PID': '5519', 'TERM_SESSION_ID': '28DC0BD0-4ED2-4C96-B2D9-1375A8C804D8', 'LANG': 'en_US.UTF-8', 'TMPDIR': '/var/folders/bj/2h_6v_sd7rn4_4hvy91gy_rm0000gn/T/', 'SSH_AUTH_SOCK': '/private/tmp/com.apple.launchd.vrnAzalULu/Listeners', 'TERM_PROGRAM_VERSION': '361.1', '_': '/Users/sushmitroy/anaconda/bin/jupyter-notebook', 'USER': 'sushmitroy', 'TERM_PROGRAM': 'Apple_Terminal', 'SHLVL': '2', 'PATH': '/Users/sushmitroy/anaconda/bin:/Users/sushmitroy/anaconda/bin:/Users/sushmitroy/anaconda/bin:/Users/sushmitroy/anaconda/bin://anaconda/bin:/Users/sushmitroy/anaconda/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin'}, 'stdout': None, 'start_new_session': True}

[E 01:25:15.946 NotebookApp] Unhandled error in API request
Traceback (most recent call last):
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/notebook/base/handlers.py", line 457, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/notebook/services/sessions/handlers.py", line 62, in post
kernel_id=kernel_id))
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_name)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1014, in run
yielded = self.gen.throw(*exc_info)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 1008, in run
value = future.result()
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/concurrent.py", line 232, in result
raise_exc_info(self._exc_info)
File "<string>", line 3, in raise_exc_info
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/tornado/gen.py", line 282, in wrapper
yielded = next(result)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/notebook/services/kernels/kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/jupyter_client/manager.py", line 243, in start_kernel
**kw)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/jupyter_client/manager.py", line 189, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/Users/sushmitroy/anaconda/lib/python3.5/site-packages/jupyter_client/launcher.py", line 123, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/Users/sushmitroy/anaconda/lib/python3.5/subprocess.py", line 950, in __init__
restore_signals, start_new_session)
File "/Users/sushmitroy/anaconda/lib/python3.5/subprocess.py", line 1544, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/sushmitroy/anaconda/envs/py35/bin/python'
[E 01:25:15.954 NotebookApp] {
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US,en;q=0.8",
"Accept": "application/json, text/javascript, */*; q=0.01",
"Content-Type": "application/json",
"Host": "localhost:8888",
"X-Requested-With": "XMLHttpRequest",
"Content-Length": "76",
"Connection": "keep-alive",
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36",
"Origin": "http://localhost:8888",
"Referer": "http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=python3"
}
[E 01:25:15.955 NotebookApp] 500 POST /api/sessions (::1) 51.32ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=python3

最佳答案

python -m IPython kernelspec install-self

成功了

这是链接

https://github.com/jupyter/notebook/issues/300

关于python - Anaconda 错误启动 python 3 jupyter notebook,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36905982/

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