python - 我无法在 anaconda 环境中安装 Jupyter 和 Matplotlib

标签 python matplotlib pycharm anaconda jupyter-notebook

我有一个 Anaconda 环境(除了 root 之外),我尝试安装这两个库,但没有成功。我尝试过:

  • 通过 Anaconda Navigator 的环境工具安装库 “遇到多个错误。”错误。我可以获得更多相关信息吗?我看到的选项没有再说什么。
  • 'Multiple Errors Encountered.'

  • 使用 Anaconda Navigator 应用程序的安装选项安装 Jupyter 也出现同样的错误
  • 'Multiple Errors Encountered.'

  • 在环境所在的控制台和 cd 中使用 conda install jupyterconda install matplotlib 进行安装。控制台 完成了流程,它说两个图书馆都已经 安装。我在 Anaconda Navigator 的库列表中检查它并 它没有出现。
  • (base) C:\Users...>cd C:\Users\Alvaro\Anaconda3\envs\tensorflow

    (base) C:\Users...\Anaconda3\envs\tensorflow>conda install matplotlib Solving environment: done

    All requested packages already installed.

    (base) C:\Users\Alvaro\Anaconda3\envs\tensorflow>conda install jupyter Solving environment: done

    All requested packages already installed.

  • 使用 pip install jupyterpip install matplotlib 安装,其结果与 conda 安装选项类似。

    • (base) C:\Users\Alvaro\Anaconda3\envs\tensorflow>pip install jupyter Requirement already satisfied: jupyter in c:\users\alvaro\anaconda3\lib\site-packages (1.0.0) Requirement already satisfied: notebook in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (5.5.0) Requirement already satisfied: qtconsole in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (4.3.1) Requirement already satisfied: jupyter-console in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (5.2.0) Requirement already satisfied: nbconvert in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (5.3.1) Requirement already satisfied: ipykernel in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (4.8.2) Requirement already satisfied: ipywidgets in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter) (7.2.1) Requirement already satisfied: jupyter-client>=5.2.0 in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (5.2.3) Requirement already satisfied: nbformat in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (4.4.0) Requirement already satisfied: ipython-genutils in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (0.2.0) Requirement already satisfied: Send2Trash in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (1.5.0) Requirement already satisfied: traitlets>=4.2.1 in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (4.3.2) Requirement already satisfied: terminado>=0.8.1 in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (0.8.1) Requirement already satisfied: jinja2 in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (2.10) Requirement already satisfied: jupyter-core>=4.4.0 in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (4.4.0) Requirement already satisfied: tornado>=4 in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (5.0.2) Requirement already satisfied: pyzmq>=17 in c:\users\alvaro\anaconda3\lib\site-packages (from notebook->jupyter) (17.0.0) Requirement already satisfied: ipython in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter-console->jupyter) (6.4.0) Requirement already satisfied: prompt_toolkit<2.0.0,>=1.0.0 in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter-console->jupyter) (1.0.15) Requirement already satisfied: pygments in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter-console->jupyter) (2.2.0) Requirement already satisfied: mistune>=0.7.4 in c:\users\alvaro\anaconda3\lib\site-packages (from nbconvert->jupyter) (0.8.3) Requirement already satisfied: entrypoints>=0.2.2 in c:\users\alvaro\anaconda3\lib\site-packages (from nbconvert->jupyter) (0.2.3) Requirement already satisfied: bleach in c:\users\alvaro\anaconda3\lib\site-packages (from nbconvert->jupyter) (2.1.3) Requirement already satisfied: pandocfilters>=1.4.1 in c:\users\alvaro\anaconda3\lib\site-packages (from nbconvert->jupyter) (1.4.2) Requirement already satisfied: testpath in c:\users\alvaro\anaconda3\lib\site-packages (from nbconvert->jupyter) (0.3.1) Requirement already satisfied: widgetsnbextension~=3.2.0 in c:\users\alvaro\anaconda3\lib\site-packages (from ipywidgets->jupyter) (3.2.1) Requirement already satisfied: python-dateutil>=2.1 in c:\users\alvaro\anaconda3\lib\site-packages (from jupyter-client>=5.2.0->notebook->jupyter) (2.7.3) Requirement already satisfied: jsonschema!=2.5.0,>=2.4 in c:\users\alvaro\anaconda3\lib\site-packages (from nbformat->notebook->jupyter) (2.6.0) Requirement already satisfied: six in c:\users\alvaro\anaconda3\lib\site-packages (from traitlets>=4.2.1->notebook->jupyter) (1.11.0) Requirement already satisfied: decorator in c:\users\alvaro\anaconda3\lib\site-packages (from traitlets>=4.2.1->notebook->jupyter) (4.3.0) Requirement already satisfied: MarkupSafe>=0.23 in c:\users\alvaro\anaconda3\lib\site-packages (from jinja2->notebook->jupyter) (1.0) Requirement already satisfied: setuptools>=18.5 in c:\users\alvaro\anaconda3\lib\site-packages (from ipython->jupyter-console->jupyter) (39.1.0) Requirement already satisfied: simplegeneric>0.8 in c:\users\alvaro\anaconda3\lib\site-packages (from ipython->jupyter-console->jupyter) (0.8.1) Requirement already satisfied: backcall in c:\users\alvaro\anaconda3\lib\site-packages (from ipython->jupyter-console->jupyter) (0.1.0) Requirement already satisfied: pickleshare in c:\users\alvaro\anaconda3\lib\site-packages (from ipython->jupyter-console->jupyter) (0.7.4) Requirement already satisfied: colorama; sys_platform == "win32" in c:\users\alvaro\anaconda3\lib\site-packages (from ipython->jupyter-console->jupyter) (0.3.9) Requirement already satisfied: jedi>=0.10 in c:\users\alvaro\anaconda3\lib\site-packages (from ipython->jupyter-console->jupyter) (0.12.0) Requirement already satisfied: wcwidth in c:\users\alvaro\anaconda3\lib\site-packages (from prompt_toolkit<2.0.0,>=1.0.0->jupyter-console->jupyter) (0.1.7) Requirement already satisfied: html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre in c:\users\alvaro\anaconda3\lib\site-packages (from bleach->nbconvert->jupyter) (1.0.1) Requirement already satisfied: parso>=0.2.0 in c:\users\alvaro\anaconda3\lib\site-packages (from jedi>=0.10->ipython->jupyter-console->jupyter) (0.2.0) Requirement already satisfied: webencodings in c:\users\alvaro\anaconda3\lib\site-packages (from html5lib!=1.0b1,!=1.0b2,!=1.0b3,!=1.0b4,!=1.0b5,!=1.0b6,!=1.0b7,!=1.0b8,>=0.99999999pre->bleach->nbconvert->jupyter) (0.5.1) distributed 1.21.8 requires msgpack, which is not installed. You are using pip version 10.0.1, however version 18.0 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

  • 用PyCharm安装,用它的解释器设置的库安装功能。安装时也会出现错误:

  • Install packages failed: Installing packages: error occurred. Details...

我尝试成功安装其他库(例如 sympy),但我没有使用 Jupyter 和 Matplotlib 实现它。

根环境有这个库,但我不知道是否可以从那里导入。 我应该如何进行?

非常感谢

最佳答案

这篇博文解释了如何将 jupyter 安装到 virtualenv 中(免责声明:我自己没有想到): http://anbasile.github.io/programming/2017/06/25/jupyter-venv/

总结:

$ python -m venv projectname
$ source projectname/bin/activate
(venv) $ pip install ipykernel
(venv) $ ipython kernel install --user --name=projectname

关于python - 我无法在 anaconda 环境中安装 Jupyter 和 Matplotlib,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52443042/

相关文章:

python - PyCharm 如何在 macOS 上创建一个与 Matplotlib 一起工作的 virtualenv?

python - 查看 Django 中以其他列为条件的新列

python - 如何实现处理 URL 的工作线程队列

python - 使用 bokeh 或 matplotlib 的 Pandas DataFrame 分层饼图/ donut chart

matplotlib - 如何在不根据原始数据计算的情况下绘制宽度不等的直方图?

python - PyCharm 警告字符串和字节连接,但一切都是字符串

Python 反序列化 ViewState

python - 检查 Python 文件中是否有多个匹配项

python - Matplotlib Latex 格式化

mysql - Python 3.X 从表中读取空值