[Python] Package r-mclust installed with Anaconda but fails to import

Discussão em 'Python' iniciado por Stack, Junho 29, 2025.

  1. Stack

    Stack Membro Participativo

    I usually get by with the default packages in the anaconda environments, so I'm a beginner at this. I want to use the package r-mclust that is available from conda forge, and I installed it as instructed, but it keeps failing to import when I try to use it in VScode for example.

    Any tips on what I could do to fix this?

    I installed the package with

    conda install conda-forge::r-mclust


    with the correct environment activated. The package shows up in the package list accessible from the navigator environments section, so I think it did work. However, when I go to VScode and try to import it, with the matching kernel selected, I keep getting the ModuleNotFoundError. Since the package has a dash in it, I've tried just import mclust, r.mclust and

    import importlib
    mclust = importlib.import_module("r-mclust")
    import mclust```


    None of the above work, which makes me think the package got installed wrong or there is an issue with some paths, or I am using the wrong command attempting to import it? In the same environment, I have astropy installed, with a similar method. That does import just fine with 'import astropy'.

    Continue reading...

Compartilhe esta Página