1

In my development environment I am trying to install some packages from an artifactory private repository to my conda environment. I'm trying to explicitly use only the .tar.bz2 file instead of .conda packages as I keep getting a 404 error when trying to pull .conda packages. However, when I'm trying to create an environment, conda is still trying to use .conda packages instead of its .tar.bz2 equivalent.

I've tried modifying the .condarc so that I've set use_only_tar_bz2 to true. When I ran conda config --show, it shows that use_only_tar_bz2 flag has been set to true.

When I run "conda search" against the .conda packages I'm trying to install (_libgcc_mutex, libgcc-ng, libstdcss-ng), conda is able to find these packages in the artifactory remotes. However, when I try to install these I get a

CondaHTTPError: HTTP 404 NOT Found for url artifactory.remote.url

The conda version I have is 4.7.12. The conda-build version I have is 3.18.10.

I would expect that only the .tar.bz2 file gets pulled from Artifactory when running conda install. However, conda is throwing a 404 error trying to pull the .conda package instead of the .tar.bz2 file.

eKenMC
  • 51
  • 2
  • 4

2 Answers2

0

Updated:


You have to visit: How to install conda modules using .tar.bz2. Here the fact is that, a .tar.bz2 file tells you that it is an archive created with tar and compressed with bzip2.

Here are simple workarounds Either you can go like this way:

Add use_only_tar_bz2: true to your .condarc file. This setting will force conda to use .tar.bz2 packages only.

$ cat .condarc
channel_alias: https://artifactory.xxx.xx/artifactory/api/conda
channels:
  - anaconda-main
use_only_tar_bz2: true

If you still find an issue, be sure to run a "conda clean" as i think "conda clean -i " might be enough. "conda clean --all" definitely worked for me.

Or if you want to get only tar.bz2 files then you should specify your command as follows:

conda install --offline --verbose c:\temp\pytest.tar.bz2

Now, if you unpack that tar.bz2 file and there's no info/files file in it, then it's not a conda package.

Here is an example of installation of open-cv module using tar.bz2: For example. . If you want to learn in detail, you can see installing conda packages offline and also visit reference: Conda - offline installations / update.

Muhammad Usman Bashir
  • 1,441
  • 2
  • 14
  • 43
  • Hi Muhammad thanks for the response. I'm currently working on a linux environment and I'm primarily using Conda for installing conda dependencies when creating a virtual environment. I think your answer is with regards to perhaps a different issue? – eKenMC Nov 05 '19 at 18:11
  • You can go like this : `conda install package-name.tar.bz2` – Muhammad Usman Bashir Nov 05 '19 at 18:34
  • Well the issue isn't that I'm unable to install .tar.bz2 packages. The issue is that when I'm running conda install, conda is pulling .conda packages instead of .tar.bz2 from my private repositories. I want to force it to use the old file format .tar.bz2 instead of the .conda package format. Sorry if it wasn't clear! – eKenMC Nov 05 '19 at 18:54
  • Have you visited the reference links, in answer ? – Muhammad Usman Bashir Nov 05 '19 at 18:56
  • 1
    Yes I have. I understand that If I download the packages locally then I can run conda install on a .tar.bz2 package (and by extension I guess .conda packages also). However, I'd rather not have to download each .tar.bz2 package manually and point to that during installation. I'd like to have it so that when running conda install against my private repo that it only pulls down the .tar.bz2 file instead of its .conda equivalent. – eKenMC Nov 05 '19 at 19:01
  • Answer is now optimized. You can re-visit for solution. Add use_only_tar_bz2: true to your .condarc file. This setting will force conda to use .tar.bz2 packages. as above in answer. – Muhammad Usman Bashir Nov 05 '19 at 19:24
  • I tried adding use_only_tar_bz2: true to my .condarc but the issue is that it is not working and it is still trying to use the .conda package instead of the .tar.bz2 file. – eKenMC Nov 05 '19 at 19:52
0

The conda.base.context.Context.use_only_tar_bz2 property for some reason evaluates to False.

I can only point that you're setting use_only_tar_bz2 to true in your configuration file and thus it isn't parsed to its equivalent Python representative value.

It's documented to use the Python boolean value in configuration that are set to boolean values.

use_only_tar_bz2: True
Oluwafemi Sule
  • 36,144
  • 1
  • 56
  • 81