For example, I want to install fish shell using conda. But the server has no internet connection.
On https://anaconda.org/conda-forge/fish/files , many versions are provided. But almost the latest few versions are always in .conda format.
I downloaded linux-64/fish-3.7.0-hdab1d28_0.conda and install it using
conda install linux-64/fish-3.7.0-hdab1d28_0.conda
But this does not work. It shows a long error report like
...
FileNotFoundError: [Errno 2] No such file or directory:
'...../miniconda3/pkgs/linux-64_fzf-0.46.1-ha8f183a_0/info/repodata_record.json'
FileNotFoundError: [Errno 2] No such file or directory: '...../miniconda3/pkgs/linux-64_fzf-0.46.1-ha8f183a_0/info/index.json'
....
etc
But old version in tar.gz format like linux-64/fish-3.4.1-h682823d_0.tar.bz2 installed just fine.
So how to correctly conda install .conda file?
There is an outstanding bug with the Anaconda Cloud website that prepends the subdirectory (e.g., a linux-64_ prefix) to file names when downloading from a browser (i.e., clicking file links). This is fine for .tar.gz files, but for .conda the file name is coupled(!) to being able to correctly unpack the archive.
Error in OP shows a reference to linux-64_fzf-0.46.1-ha8f183a_0, which implies a linux-64_fzf-0.46.1-ha8f183a_0.conda file is being unpacked. However, the file name should likely not have the linux-64_ prefix. Try renaming the file to fzf-0.46.1-ha8f183a_0.conda.
Note that programmatically downloading the .conda files (e.g., with curl, wget) will not have this problem, so one may also be interested in downloading archives en masse, like what is provided for in this answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With