Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly clean package / libsolv cache from time to time #61

Closed
matrs opened this issue Nov 6, 2019 · 9 comments
Closed

Correctly clean package / libsolv cache from time to time #61

matrs opened this issue Nov 6, 2019 · 9 comments

Comments

@matrs
Copy link

matrs commented Nov 6, 2019

Hello,
first, thank for this package, it's way faster than conda and has saved me a lot of time.

The problem that I've found is that, when you want to install a specific version of a package, let's say
mamba install goatools=0.9.9, it fails to find it so isn't able to install it:

Encountered problems while solving.
Problem: nothing provides requested goatools 0.9.9.*

Notice that I'm not using globs in my search. I've found this with multiple packages and most of the time, maybe all of them, is when i want to install the latest version of a package. Of course the package is available in the conda repositories and when I try to do a mamba install package-name, without specifying the version, sometimes it doesn't install the latest one, so I specify the version, that's the reason I've had this specific problem multiple times. I understand that a package cannot be installed because of the requirements, but in these cases, mamba is saying that the package isn't available.

@wolfv
Copy link
Member

wolfv commented Nov 6, 2019

maybe it's because there is a cache: if you clear the cache beforehand with rm -rf ~/<myconda>/pkgs/cache/ does it work?

@wolfv
Copy link
Member

wolfv commented Nov 6, 2019

also, obviously, you might need to add -c bioconda?

I got this solutoin right now:

    package                    |            build
    ---------------------------|-----------------
    _libgcc_mutex-0.1          |             main           3 KB
    goatools-0.9.9             |             py_0        10.1 MB  bioconda
    graphviz-2.40.1            |       h5933667_1         6.4 MB  conda-forge
    libgcc-ng-9.1.0            |       hdf63c60_0         8.1 MB
    libstdcxx-ng-9.1.0         |       hdf63c60_0         4.0 MB
    lz4-c-1.8.3                |    hf484d3e_1001         187 KB  conda-forge
    patsy-0.5.1                |             py_0         187 KB  conda-forge
    pydot-1.4.1                |        py37_1001          40 KB  conda-forge
    pygraphviz-1.3             |   py37h14c3975_1         110 KB
    python-wget-3.2            |             py_0          13 KB  conda-forge
    statsmodels-0.10.1         |   py37hc1659b7_0         9.5 MB  conda-forge
    xlsxwriter-1.2.2           |             py_0         102 KB  conda-forge
    ------------------------------------------------------------
                                           Total:        38.7 MB

@matrs
Copy link
Author

matrs commented Nov 6, 2019

This is just an observation:
In all these cases, mamba is adding a dot . after the last number of the versions, is doing 0.9.9.* instead of 0.9.9* (without a dot after the last digit), why is this?

To answer your post:
I don't have any cache for goatools in this case. Also, conda do find the version of the packages that I'm trying to install, is this information relevant? isn't the same cache for conda and mamba?

Also, the repositories are configured properly:

$ cat ~/.condarc 
channels:
  - conda-forge
  - bioconda
  - defaults
channel_priority: flexible
report_errors: true

using -c bioconda doesn't fix it for me.

When i try a new environment conda succeeds:

$conda create -n goatest  goatools=0.9.9
.............
.............
xorg-xproto        conda-forge/linux-64::xorg-xproto-7.0.31-h14c3975_1007
  xz                 conda-forge/linux-64::xz-5.2.4-h14c3975_1001
  zlib               conda-forge/linux-64::zlib-1.2.11-h516909a_1006
  zstd               conda-forge/linux-64::zstd-1.4.3-h3b9ef0a_0


Proceed ([y]/n)? 

But mamba fails:

mamba create -n goatest  goatools=0.9.9 
.............
.............
Looking for: ['goatools 0.9.9.*']

16934 packages in https://conda.anaconda.org/conda-forge/noarch
8315 packages in https://conda.anaconda.org/bioconda/noarch
27093 packages in https://conda.anaconda.org/bioconda/linux-64
74021 packages in https://conda.anaconda.org/conda-forge/linux-64
832 packages in https://repo.anaconda.com/pkgs/main/noarch
3536 packages in https://repo.anaconda.com/pkgs/r/noarch
5893 packages in https://repo.anaconda.com/pkgs/r/linux-64
14211 packages in https://repo.anaconda.com/pkgs/main/linux-64
Encountered problems while solving.
Problem: nothing provides requested goatools 0.9.9.*

This isn't specific for this package, this has happened to me at least for 5-10 different packages in the last months. I'm using mamba 0.0.10

Also, look:

$mamba install mamba=0.0.10

Encountered problems while solving.
Problem: nothing provides requested mamba 0.0.10.*

@wolfv
Copy link
Member

wolfv commented Nov 7, 2019

Did you try to clean the folder I mentioned though?
mamba creates another sort of cache files in there (indicated with xxx.solv) which are derived from the same json file as the package.json but it might have gotten out of sync. If you could clean those files, then we could probably pin-point the problem.

@wolfv
Copy link
Member

wolfv commented Nov 7, 2019

ah, regarding the x.x.x.* specification, it's just a way to express "any build number"

for installing mamba 0.0.10 it works for me:

Getting  bioconda linux-64
Getting  bioconda noarch
Getting  conda-forge linux-64
Getting  conda-forge noarch
Getting  pkgs/main linux-64
Getting  pkgs/main noarch
Getting  pkgs/r linux-64
Getting  pkgs/r noarch

Looking for: ['mamba 0.0.10.*']

11814 packages in https://conda.anaconda.org/bioconda/noarch
17944 packages in https://conda.anaconda.org/conda-forge/noarch
14350 packages in https://repo.anaconda.com/pkgs/main/linux-64
76273 packages in https://conda.anaconda.org/conda-forge/linux-64
27993 packages in https://conda.anaconda.org/bioconda/linux-64
6005 packages in https://repo.anaconda.com/pkgs/r/linux-64
877 packages in https://repo.anaconda.com/pkgs/main/noarch
5023 packages in https://repo.anaconda.com/pkgs/r/noarch

## Package Plan ##

  environment location: /home/wolfv/miniconda3

  added / updated specs:
    - mamba=0.0.10


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    mamba-0.0.10               |   py37hc9558a2_1          96 KB  conda-forge
    ------------------------------------------------------------
                                           Total:          96 KB

Are you on OS X or Linux? (Or Win?)

@matrs
Copy link
Author

matrs commented Nov 7, 2019

$ uname -a
Linux mibu-manjaro 4.19.81-1-MANJARO #1 SMP PREEMPT Tue Oct 29 12:49:04 UTC 2019 x86_64 GNU/Linux

(based on arch linux)

In my home directory, i don't have any cache:

ls -la ~/.conda/pkgs/
total 8
drwxr-xr-x 2 mibu mibu 4096 abr  2  2018 .
drwxr-xr-x 3 mibu mibu 4096 abr  2  2018 ..
-rw-rw-r-- 1 mibu mibu    0 abr  2  2018 urls
-rw-rw-r-- 1 mibu mibu    0 abr  2  2018 urls.txt

In my environment directory, I had the json and solv files (around 30 in total), I deleted them but the error persists.

 ls -la /storage/miniconda3/envs/bif/pkgs/cache/
total 44
drwxrwsr-x   2 mibu mibu  4096 nov  7 18:52 .
drwxr-xr-x 315 mibu mibu 36864 sep 23 19:21 ..

@matrs
Copy link
Author

matrs commented Nov 19, 2019

I just erased the cache from the base env and fixed the issue, previously I erased the cache from the env I was working in. Thanks for your help

@matrs matrs closed this as completed Nov 19, 2019
@wolfv wolfv changed the title mamba not able to find the package when the version of it it's specified Correctly clean package / libsolv cache from time to time Nov 20, 2019
@wolfv wolfv reopened this Nov 20, 2019
@wolfv
Copy link
Member

wolfv commented Nov 20, 2019

I renamed the bug and reopened it! We'll have to take care of this soon.

@wolfv
Copy link
Member

wolfv commented Dec 11, 2019

The latest release (0.1.0) of mamba should fix this issue.
Thanks again.

@wolfv wolfv closed this as completed Dec 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants