python - 安装 Jupyter Notebook 时遇到问题

标签 python pip jupyter-notebook

我正在尝试在我的虚拟环境中安装 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/

相关文章:

python - 导入错误 : cannot import name suppress

css - 如何在 IPython Notebook 中并排放置 "input"和 "output_wrapper"div

c++ - 自己的字符串用法

python - pip install 给出 : skipping incompatible python libs and gcc failed with exit status 1

python - sys_platform 未定义 x64 Windows

python - 如果!期间发生键错误,如何重新启动和运行所有代码!在Google Colab中安装pip?

python - 如何在Google Cloud深度学习虚拟机上安装tensorflow-transform?

apache-spark - 在 Jupyter 上使用 Spark 内核

python - 如何多次显示用 Glade 定义的对话框?

python - 如何正确使用带有apply功能的pandas groupby来解决副作用? (第一组申请两次)