Conda cannot find packages to install
Question:
I have been using conda for quite some time without problems, and just now I started to a PackagesNotFoundError
error when ever I try to install a package. For example if I try:
conda install scipy --channel conda-forge
I am getting this:
PackagesNotFoundError: The following packages are not available from current channels:
- scipy
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
But then if I use anaconda to search this package, I can see it at conda-forge channel. Then even if I use the command suggested by anaconda; conda install --channel https://conda.anaconda.org/conda-forge scipy
, I get the same error.
On an attempt to solve the issue, I reinstalled a new version of conda, but the issue persists and I can’t install anything with conda at the moment. Can someone give me a clue of what is going wrong?
UPDATE
As recommended by some suggestions
I have run:
conda clean -all
conda clean --index-cache
conda update conda
And I still have the same issue
The version of my current conda is 4.8.2
UPDATE 2
@merv suggested to run with the vervose flag, so I ran conda search -c conda-forge scipy -vvv
and got this:
DEBUG conda.gateways.logging:set_verbosity(231): verbosity set to 3
Loading channels: ...working... TRACE conda.gateways.disk.test:file_path_is_writable(25): checking path is writable /path/miniconda/pkgs/urls.txt
DEBUG conda.core.package_cache_data:_check_writable(259): package cache directory '/path/miniconda/pkgs' writable: True
INFO conda.core.subdir_data:query_all(94): Ignoring the following channel urls because mode is offline.
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
done
No match found for: scipy. Search: *scipy*
INFO conda.core.subdir_data:query_all(94): Ignoring the following channel urls because mode is offline.
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
Traceback (most recent call last):
File "/path/miniconda/lib/python3.6/site-packages/conda/exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "/path/miniconda/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/path/miniconda/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
return getattr(module, func_name)(args, parser)
File "/path/miniconda/lib/python3.6/site-packages/conda/cli/main_search.py", line 90, in execute
raise PackagesNotFoundError((text_type(spec),), channels_urls)
conda.exceptions.PackagesNotFoundError: The following packages are not available from current channels:
- scipy
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I think the part that says Ignoring the following channel urls because mode is offline
is very likely related with this error since I can’t access the packages from any of the channels. However, I still don’t know how to change the mode of the urls.
Answers:
I finally found the solution to this issue (see comments). The problem was at my conda configuration, where I was working under an offline mode. To solve this issue I just ran:
conda config --set offline false
Thanks for your help @merv!
The packages installed would show in pip list or conda list but would throw an import error when called from jupyter or so.
After hours and hours of searching, a simple "Update index" button of the Anaconda navigator solved my problem. Update index button of Anaconda Navigator
I have been using conda for quite some time without problems, and just now I started to a PackagesNotFoundError
error when ever I try to install a package. For example if I try:
conda install scipy --channel conda-forge
I am getting this:
PackagesNotFoundError: The following packages are not available from current channels:
- scipy
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
But then if I use anaconda to search this package, I can see it at conda-forge channel. Then even if I use the command suggested by anaconda; conda install --channel https://conda.anaconda.org/conda-forge scipy
, I get the same error.
On an attempt to solve the issue, I reinstalled a new version of conda, but the issue persists and I can’t install anything with conda at the moment. Can someone give me a clue of what is going wrong?
UPDATE
As recommended by some suggestions
I have run:
conda clean -all
conda clean --index-cache
conda update conda
And I still have the same issue
The version of my current conda is 4.8.2
UPDATE 2
@merv suggested to run with the vervose flag, so I ran conda search -c conda-forge scipy -vvv
and got this:
DEBUG conda.gateways.logging:set_verbosity(231): verbosity set to 3
Loading channels: ...working... TRACE conda.gateways.disk.test:file_path_is_writable(25): checking path is writable /path/miniconda/pkgs/urls.txt
DEBUG conda.core.package_cache_data:_check_writable(259): package cache directory '/path/miniconda/pkgs' writable: True
INFO conda.core.subdir_data:query_all(94): Ignoring the following channel urls because mode is offline.
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
done
No match found for: scipy. Search: *scipy*
INFO conda.core.subdir_data:query_all(94): Ignoring the following channel urls because mode is offline.
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
Traceback (most recent call last):
File "/path/miniconda/lib/python3.6/site-packages/conda/exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "/path/miniconda/lib/python3.6/site-packages/conda/cli/main.py", line 84, in _main
exit_code = do_call(args, p)
File "/path/miniconda/lib/python3.6/site-packages/conda/cli/conda_argparse.py", line 82, in do_call
return getattr(module, func_name)(args, parser)
File "/path/miniconda/lib/python3.6/site-packages/conda/cli/main_search.py", line 90, in execute
raise PackagesNotFoundError((text_type(spec),), channels_urls)
conda.exceptions.PackagesNotFoundError: The following packages are not available from current channels:
- scipy
Current channels:
- https://conda.anaconda.org/conda-forge/linux-64
- https://conda.anaconda.org/conda-forge/noarch
- https://conda.anaconda.org/bioconda/linux-64
- https://conda.anaconda.org/bioconda/noarch
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://conda.anaconda.org/cgat/linux-64
- https://conda.anaconda.org/cgat/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
I think the part that says Ignoring the following channel urls because mode is offline
is very likely related with this error since I can’t access the packages from any of the channels. However, I still don’t know how to change the mode of the urls.
I finally found the solution to this issue (see comments). The problem was at my conda configuration, where I was working under an offline mode. To solve this issue I just ran:
conda config --set offline false
Thanks for your help @merv!
The packages installed would show in pip list or conda list but would throw an import error when called from jupyter or so.
After hours and hours of searching, a simple "Update index" button of the Anaconda navigator solved my problem. Update index button of Anaconda Navigator