How to install fuzzy c-means package in anaconda?

1.2k views Asked by At

I tried pip install fcmeans and pip install f-c-means, but neither of them worked.

2

There are 2 answers

0
Capybara On

Here is what you could do:

  1. Install Anaconda and make sure it is working
  2. In the folder you are going to be working in, create a file, environment.yaml
  3. Configure the environment.yaml so that it contains the packages you want to work with. See the sample environment.yaml below. Note that fuzzy-c-means is pip-installed because it doesn't seem that it is currently hosted directly through anaconda channels
  4. From a terminal in the directory you will be working with (where the environment.yaml is saved), run conda env create --file environment.yaml. This will create a new virtual environment containing the packages you want, including fuzzy-c-means.
  5. Activate the new virtual environment that you created, which was the specified as name in the environment.yaml using conda activate my_env_name. You should note that the name of the environment should appear in the terminal prompt, indicating that the virtual environment is active.
  6. If you are using an IDE with some kind of console where you run code, make sure the interpreter is configured to use the new virtual environment that you just created.
  7. If you need to make changes to the environment, like add new packages, add them to the environment.yaml and then either delete the entire environment and build it from scratch or run conda env update --file environment.yaml --prune

Sample environment.yaml file

name: my_env_name
channels:
    - defaults
dependencies:
    - python=3.9
    - jupyter
    - notebook
    - numpy
    - pandas
    - pip
    - pip:
        - fuzzy-c-means

0
ISAAC RITHARSON P On

Try pip install fuzzy-c-means and it worked for me