错误:安装mglearn

时间:2018-01-21 13:26:28

标签: python pip install conda

我使用了" pip install mglearn"和" conda安装mglearn"。 但它向我显示以下错误:

Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
  - mglearn
Current channels:
  - https://conda.anaconda.org/conda-forge/win-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.continuum.io/pkgs/main/win-64
  ...
  - https://repo.continuum.io/pkgs/msys2/win-64
  - https://repo.continuum.io/pkgs/msys2/noarch

我有" Python 3.6.3 :: Anaconda自定义(64位)"

8 个答案:

答案 0 :(得分:2)

您可以从its official github repository下载mglearn项目并将 mglearn 文件夹复制到

Anaconda3\Lib\site-packages

答案 1 :(得分:1)

这对我有用:

https://github.com/amueller/introduction_to_ml_with_python/issues/71

conda install pip 
pip install mglearn

事实上,我打开了Anaconda ipython3 Shell,并运行了这些命令,而无需重新启动Shell。

答案 2 :(得分:0)

I tried using pip install mglearn and it worked for me. While conda install mglearn is not working due to unknown reasons.

答案 3 :(得分:0)

在您的终端中尝试使用sudo pip3 install mglearn而不是pip install mglearn。对于Python 3.x,用pip替换pip3很重要。

答案 4 :(得分:0)

想要在PyCharm中的项目中使用新环境使用mglearn的人们(在创建新项目时选择在PyCharm中创建新环境的选项)。 在Anaconda环境中使用命令pip install mglearn安装mglearn之后(Anaconda3 \ lib \ site-packages),您需要将文件夹mglearn复制到新环境(Anaconda3 \ envs \“您的项目” \ Lib \ site-packages) )。它对我有用。

答案 5 :(得分:0)

尝试在conda提示符下输入pip install mglearn,它对我有用。

答案 6 :(得分:0)

重新启动系统,然后重试。 我也遇到过类似的问题。第一次,我在终端中发现了一些错误。然后,我重新启动计算机,并再次输入相同的命令,这一次它运行良好。因此,我认为您应该先尝试至少两到三遍,然后再尝试其他解决方案。

答案 7 :(得分:0)

如果您使用 Jupyter notebook,安装 mglearn 的最简单方法是输入:

!pip install mglearn

然后按常规方式导入模块:

import mglearn

这对我有用: enter image description here

enter image description here