gpt4 book ai didi

python - 安装 Jupyter Notebook 时遇到问题

转载 作者:行者123 更新时间:2023-12-01 09:28:18 25 4
gpt4 key购买 nike

我正在尝试在我的虚拟环境中安装 jupyter 笔记本。我的虚拟环境和最新的 pip 版本上运行 python 3.5。我在使用 pip 安装几乎所有库时都遇到问题。即使我运行以下命令,它也会出现以下错误:

python3 -m pip install --upgrade pip
python3 -m pip install jupyter

错误:

The directory '/Users/[user]/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/[user]/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting jupyter
Could not fetch URL https://pypi.python.org/simple/jupyter/: There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:645) - skipping
Could not find a version that satisfies the requirement jupyter (from versions: )
No matching distribution found for jupyter

最佳答案

啊,是的,在 MacOS 上正确安装 Python 的永恒问题......

您应该使用 brew 安装 python 来防止这些问题,因为它将把您设置为所有目录的正确所有者,而不是 root。这似乎是一个很好的指南:How can I use Homebrew to install both Python 2 and 3 on Mac?

或者,您可以使用 sudo 运行上面的代码,但不鼓励这种做法。

关于python - 安装 Jupyter Notebook 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50182985/

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