kalininalab / DataSAIL

DataSAIL is a tool to split datasets while reducing information leakage.
https://datasail.readthedocs.io
MIT License
18 stars 1 forks source link

OSX installability #3

Closed Old-Shatterhand closed 1 year ago

Old-Shatterhand commented 1 year ago

Hi @Old-Shatterhand, I install the mamba and then run your script. Thank you for your patience with me. Here is the error I encountered. I think it is the same as the previous error

(py310_caddseminar2023) vahidatabaigi@vahids-MBP CADDSeminar_2023 % conda install mamba
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
  current version: 23.3.1
  latest version: 23.5.0

Please update conda by running

    $ conda update -n base -c defaults conda

Or to minimize the number of packages updated during conda update use

     conda install conda=23.5.0

## Package Plan ##

  environment location: /Users/vahidatabaigi/miniconda3/envs/py310_caddseminar2023

  added / updated specs:
    - mamba

The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    c-ares-1.19.0              |       h80987f9_0         104 KB
    ca-certificates-2023.05.30 |       hca03da5_0         121 KB
    certifi-2023.5.7           |  py310hca03da5_0         153 KB
    conda-22.11.1              |  py310hca03da5_5         957 KB
    conda-package-handling-2.1.0|  py310hca03da5_0         270 KB
    conda-package-streaming-0.8.0|  py310hca03da5_0          29 KB
    cryptography-38.0.4        |  py310hfc83b78_0         1.0 MB  conda-forge
    fmt-9.1.0                  |       h48ca7d4_0         179 KB
    krb5-1.20.1                |       h48293ea_0         1.2 MB
    libarchive-3.6.2           |       h82b9b87_1         781 KB  conda-forge
    libcurl-8.1.2              |       h912dcd9_0         338 KB  conda-forge
    libedit-3.1.20221030       |       h80987f9_0         154 KB
    libev-4.33                 |       h1a28f6b_1         104 KB
    libmamba-1.4.2             |       h7d1d596_0         1.1 MB  conda-forge
    libmambapy-1.4.2           |  py310h34b6e76_0         216 KB  conda-forge
    libnghttp2-1.52.0          |       hae82a92_0         551 KB  conda-forge
    libsolv-0.7.24             |       hb5ab8b9_0         377 KB  conda-forge
    libssh2-1.11.0             |       h7a5bd25_0         250 KB  conda-forge
    lz4-c-1.9.4                |       h313beb8_0         155 KB
    lzo-2.10                   |       h1a28f6b_2         129 KB
    mamba-1.4.2                |  py310ha5d4528_0          50 KB  conda-forge
    pybind11-abi-4             |       hd3eb1b0_1          14 KB
    reproc-14.2.4              |       hc377ac9_1          27 KB
    reproc-cpp-14.2.4          |       hc377ac9_1          20 KB
    ruamel.yaml.clib-0.2.7     |  py310h8e9501a_1         107 KB  conda-forge
    yaml-cpp-0.7.0             |       hc377ac9_1         427 KB
    ------------------------------------------------------------
                                           Total:         8.7 MB

The following NEW packages will be INSTALLED:

  c-ares             pkgs/main/osx-arm64::c-ares-1.19.0-h80987f9_0
  conda              pkgs/main/osx-arm64::conda-22.11.1-py310hca03da5_5
  conda-package-han~ pkgs/main/osx-arm64::conda-package-handling-2.1.0-py310hca03da5_0
  conda-package-str~ pkgs/main/osx-arm64::conda-package-streaming-0.8.0-py310hca03da5_0
  cryptography       conda-forge/osx-arm64::cryptography-38.0.4-py310hfc83b78_0
  fmt                pkgs/main/osx-arm64::fmt-9.1.0-h48ca7d4_0
  krb5               pkgs/main/osx-arm64::krb5-1.20.1-h48293ea_0
  libarchive         conda-forge/osx-arm64::libarchive-3.6.2-h82b9b87_1
  libcurl            conda-forge/osx-arm64::libcurl-8.1.2-h912dcd9_0
  libedit            pkgs/main/osx-arm64::libedit-3.1.20221030-h80987f9_0
  libev              pkgs/main/osx-arm64::libev-4.33-h1a28f6b_1
  libmamba           conda-forge/osx-arm64::libmamba-1.4.2-h7d1d596_0
  libmambapy         conda-forge/osx-arm64::libmambapy-1.4.2-py310h34b6e76_0
  libnghttp2         conda-forge/osx-arm64::libnghttp2-1.52.0-hae82a92_0
  libsolv            conda-forge/osx-arm64::libsolv-0.7.24-hb5ab8b9_0
  libssh2            conda-forge/osx-arm64::libssh2-1.11.0-h7a5bd25_0
  lz4-c              pkgs/main/osx-arm64::lz4-c-1.9.4-h313beb8_0
  lzo                pkgs/main/osx-arm64::lzo-2.10-h1a28f6b_2
  mamba              conda-forge/osx-arm64::mamba-1.4.2-py310ha5d4528_0
  pluggy             pkgs/main/osx-arm64::pluggy-1.0.0-py310hca03da5_1
  pybind11-abi       pkgs/main/noarch::pybind11-abi-4-hd3eb1b0_1
  pycosat            pkgs/main/osx-arm64::pycosat-0.6.4-py310h1a28f6b_0
  pyopenssl          pkgs/main/osx-arm64::pyopenssl-23.0.0-py310hca03da5_0
  reproc             pkgs/main/osx-arm64::reproc-14.2.4-hc377ac9_1
  reproc-cpp         pkgs/main/osx-arm64::reproc-cpp-14.2.4-hc377ac9_1
  ruamel.yaml        pkgs/main/osx-arm64::ruamel.yaml-0.17.21-py310h1a28f6b_0
  ruamel.yaml.clib   conda-forge/osx-arm64::ruamel.yaml.clib-0.2.7-py310h8e9501a_1
  toolz              pkgs/main/osx-arm64::toolz-0.12.0-py310hca03da5_0
  tqdm               pkgs/main/osx-arm64::tqdm-4.65.0-py310h33ce5c2_0
  yaml-cpp           pkgs/main/osx-arm64::yaml-cpp-0.7.0-hc377ac9_1
  zstandard          pkgs/main/osx-arm64::zstandard-0.19.0-py310h80987f9_0

The following packages will be UPDATED:

  ca-certificates    conda-forge::ca-certificates-2023.5.7~ --> pkgs/main::ca-certificates-2023.05.30-hca03da5_0

The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            conda-forge/noarch::certifi-2023.5.7-~ --> pkgs/main/osx-arm64::certifi-2023.5.7-py310hca03da5_0

Proceed ([y]/n)? y

Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(py310_caddseminar2023) vahidatabaigi@vahids-MBP CADDSeminar_2023 % which mamba
/Users/vahidatabaigi/miniconda3/envs/py310_caddseminar2023/bin/mamba
(py310_caddseminar2023) vahidatabaigi@vahids-MBP CADDSeminar_2023 % mamba install -c kalininalab -c conda-forge -c mosek -c bioconda datasail

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (1.4.2) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████

Looking for: ['datasail']

mosek/osx-arm64                                      4.2kB @   8.7kB/s  0.5s
pkgs/r/osx-arm64                                   118.0 B @ 167.0 B/s  0.2s
kalininalab/noarch                                 135.0 B @ 173.0 B/s  0.8s
kalininalab/osx-arm64                              136.0 B @ 142.0 B/s  1.0s
mosek/noarch                                       135.0 B @ 116.0 B/s  0.2s
pkgs/main/noarch                                   837.8kB @ 148.5kB/s  4.5s
pkgs/r/noarch                                        1.3MB @ 189.3kB/s  6.1s
bioconda/osx-arm64                                 129.0 B @  17.0 B/s  0.6s
pkgs/main/osx-arm64                                  1.7MB @ 140.7kB/s  6.2s
conda-forge/osx-arm64                                6.5MB @ 429.4kB/s 15.3s
bioconda/noarch                                      4.3MB @ 279.4kB/s 14.7s
conda-forge/noarch                                  12.5MB @ 667.8kB/s 19.1s

Pinned packages:
  - python 3.10.*

Could not solve for environment specs
The following package could not be installed
└─ datasail   does not exist (perhaps a typo or a missing channel).
(py310_caddseminar2023) vahidatabaigi@vahids-MBP CADDSeminar_2023 % conda search -c conda-forge datasail
Loading channels: done
No match found for: datasail. Search: *datasail*

PackagesNotFoundError: The following packages are not available from current channels:

  - datasail

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

best regards Vahid

Originally posted by @atabaigi in https://github.com/kalininalab/DataSAIL/issues/2#issuecomment-1584438874

Old-Shatterhand commented 1 year ago

For completeness: The used os for this reported issue is macOS ventura 13.4, chip M1 Reference: https://github.com/kalininalab/DataSAIL/issues/2#issuecomment-1584467725

Old-Shatterhand commented 1 year ago

Hi @atabaigi,

as a first workarond, I suggest you install DataSAIL from source and use it as a python package. Therefore, please run

conda create -n <env_name> python=3.10
conda activate <env_name>
mamba install -c mosek -c conda-forge -c bioconda -y numpy pandas networkx matplotlib pytest setuptools pyscipopt foldseek mmseqs2 cd-hit mash tmalign cvxpy pytest-cov rdkit pytest-cases scikit-learn
pip install grakel

(assuming mamba is installed system-wide or in the base environment of the conda installation)

Now, you should be able to use DataSAIL as a python package, e.g.,

from datasail.sail import datasail

_, splits, _ = datasail(techniques=["CCSe"], e_type="M", e_data="input2500.tsv")

I hope this works as a quick patch for you and I will investigate the problem, but this might take one or two weeks.

Best, Roman

Old-Shatterhand commented 1 year ago

Hi @atabaigi,

I'm sorry, I didn't read your post properly. You don't have an issue with installing DataSAIL on OSX (it succeeds for me), but you try to find it in the wrong channel. You need to run

conda search -c kalininalab datasail

DataSAIL is uploaded to the kalininalab channel, therefore, you cannot find it in the conda-forge channel.

If you run

mamba install -c kalininalab -c mosek -c conda-forge -c bioconda -y numpy pandas networkx matplotlib pytest setuptools pyscipopt foldseek mmseqs2 cd-hit mash tmalign cvxpy pytest-cov rdkit pytest-cases scikit-learn mosek
pip install grakel

you should be able to install DataSAIL.

Best, Roman