Reputation: 4600
I am trying to install ngram in python, but it gives error. I tried These codes but again all of them gave the same error:
conda install ngram
second:
conda config --add channels loopbio
conda config --append channels conda-forge
conda install ngram -c conda-forge
and the error is:
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
How can I solve it?
I also tried
pip install ngram
Upvotes: 3
Views: 20291
Reputation: 54068
Searching on anaconda.org shows that this package is not in any of the channels you have searched. The pypi page for the ngram package shows that it's compatible with Python 2.6, 2.7, and 3.2. It is likely that if you're using Python 3, you are using a much more recent version like 3.5 or 3.6, which this package does not seem to support. You could try installing it from source by downloading it from github and running python setup.py install
.
Upvotes: 6