我正在尝试在python中安装ngram,但它给出了错误。我尝试了这些代码,但所有这些代码都给出了同样的错误:
conda install ngram
第二
conda config --add channels loopbio
conda config --append channels conda-forge
conda install ngram -c conda-forge
,错误是:
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- ngram
Current channels:
- https://conda.anaconda.org/conda-forge/win-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/loopbio/win-64
- https://conda.anaconda.org/loopbio/noarch
- https://repo.continuum.io/pkgs/main/win-64
- https://repo.continuum.io/pkgs/main/noarch
- https://repo.continuum.io/pkgs/free/win-64
- https://repo.continuum.io/pkgs/free/noarch
- https://repo.continuum.io/pkgs/r/win-64
- https://repo.continuum.io/pkgs/r/noarch
- https://repo.continuum.io/pkgs/pro/win-64
- https://repo.continuum.io/pkgs/pro/noarch
- https://repo.continuum.io/pkgs/msys2/win-64
- https://repo.continuum.io/pkgs/msys2/noarch
我该如何解决?
我也试过
pip install ngram
答案 0 :(得分:4)
Searching on anaconda.org表示此软件包不在您搜索的任何渠道中。 ngram包的pypi page表明它与Python 2.6,2.7和3.2兼容。如果您使用的是Python 3,那么您可能正在使用更新的版本,如3.5或3.6,这个软件包似乎不支持。您可以尝试从github下载并运行python setup.py install
。