drieslab / GiottoClass

https://drieslab.github.io/GiottoClass/
Other
1 stars 12 forks source link

miniconda environment installation failed #225

Closed wwang-chcn closed 1 month ago

wwang-chcn commented 1 month ago

Describe the Error

Giotto environment installation failure.

...

Error Message

```r # Error in .os_py_path(envname = path) : # Assertion on 'path' failed: Directory '/Users/wwang/Library/r-miniconda-arm64' does not exist. ```

To Reproduce

Steps to reproduce the behavior, i.e.:

  1. Install a conda in you computer before using Giotto or other reticulate-based package. 1.1 Check the default conda path given by reticulate
# r command
reticulate::miniconda_path()
# /Users/wwang/Library/r-miniconda-arm64
1.2 Make sure you conda exists in another default place and the default conda path given by reticulate is clean.

The final conda env should look like this

# shell command
conda env list
# conda environments:
#
# base                     /Users/wwang/miniconda3
# conda_env_1        /Users/wwang/miniconda3/envs/conda_env_1
# conda_env_2       /Users/wwang/miniconda3/envs/conda_env_2

Note: /Users/wwang/miniconda3 is the default path when you install using conda's script.

1.3 You can also verify this situation in R
# r command
reticulate::conda_binary(conda = "auto") == file.path(reticulate::miniconda_path(), "bin", "conda")

The results should be FALSE.

  1. Try to install miniconda environment
installGiottoEnvironment()

Explanation

These two functions in reticulate give the conda path in different ways. The reticulate::miniconda_path() return a fixed path, while reticulate::conda_binary(conda = "auto") detect the existing conda.

jiajic commented 1 month ago

Are you on GiottoClass 0.3.5? I think I fixed the Error in .os_py_path(envname = path) : issue in this current version.

wwang-chcn commented 1 month ago

I was on GiottoClass 0.3.4. It did fixed in GiottoClass 0.3.5. Just test it.