在 Mac 上安装 Jupyter Notebook 时出现问题

在 Mac 上安装 Jupyter Notebook 时出现问题

我确实尝试了所有方法并阅读了有关此问题的所有先前帖子。

首先,我尝试安装 Anaconda,并尝试运行 Jupiter,但它说未找到命令。

然后我尝试

pip install Jupyter

我收到了一个很长的错误...

Could not install packages due to an EnvironmentError: [('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/parser.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/parser.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/relativedelta.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/relativedelta.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/zoneinfo-2010g.tar.gz', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo/zoneinfo-2010g.tar.gz', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo/zoneinfo-2010g.tar.gz'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo/__init__.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo/__init__.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo/__init__.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/zoneinfo', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/zoneinfo'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tz.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tz.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/relativedelta.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/relativedelta.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/relativedelta.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/rrule.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/rrule.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/__init__.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/__init__.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/parser.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/parser.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/parser.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tzwin.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tzwin.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/rrule.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/rrule.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/rrule.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/__init__.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/__init__.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/__init__.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.py', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/easter.py', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/easter.py'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/easter.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/easter.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/easter.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tz.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tz.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tz.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil/tzwin.pyc', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tzwin.pyc', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b/tzwin.pyc'"), ('/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/dateutil', '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b', "[Errno 1] Operation not permitted: '/private/var/folders/nt/88dygr3d4hb7fbh888q3tqyh0000gn/T/pip-uninstall-SlCL9b'")]

然后我尝试

pip install --user jupyter

它没有抛出任何错误,但当我尝试运行 Jupyter ntoebook 时仍然得到

-bash: jupyter: command not found

另一件奇怪的事情是,我似乎完全无法将 Python 从 2.7 更新到 3,这是一个单独的问题,我在这里不寻求答案,尽管它们可能相关?

谢谢你的帮助!!

答案1

问题解决了 - 事实证明,安装新软件后重新启动计算机 99% 就可以解决问题!!

相关内容