drieslab / Giotto

Spatial omics analysis toolbox
https://drieslab.github.io/Giotto_website/
Other
258 stars 98 forks source link

Error while use 'createGiottoInstructions' function #276

Closed ccgBiotechLover closed 1 year ago

ccgBiotechLover commented 2 years ago

Dear author,

firstly, When I set python_path = '/home/cuim/miniconda3/envs/R403/bin/python' and run instrs = createGiottoInstructions(save_dir = results_folder,save_plot = TRUE,show_plot = FALSE,python_path = python_path)

it returned /tmp/RtmprsuJU8/filea0352b399b67.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/udunits2-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea0352b399b67.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/geotiff-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea0352b399b67.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/gdal-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea0352b399b67.sh: 11: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/gdal-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea0352b399b67.sh: 4: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/deactivate-r-base.sh: [[: not found /tmp/RtmprsuJU8/filea0352b399b67.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/deactivate-gxx_linux-64.sh: Syntax error: "(" unexpected Error in Sys.setenv(PATH = new_path) : wrong length for argument In addition: Warning message: In system2(Sys.which("sh"), fi, stdout = if (identical(intern, FALSE)) "" else intern) : running command ''/bin/sh' /tmp/RtmprsuJU8/filea0352b399b67.sh' had status 2

and then I set python_path =NULL, then ran if(is.null(python_path)) { installGiottoEnvironment() } it returned giotto environment found at /newdata/chencg/.local/share/r-miniconda/envs/giotto_env/bin/python /tmp/RtmprsuJU8/filea035187390f3.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/udunits2-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea035187390f3.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/geotiff-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea035187390f3.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/gdal-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea035187390f3.sh: 11: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/gdal-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea035187390f3.sh: 4: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/deactivate-r-base.sh: [[: not found /tmp/RtmprsuJU8/filea035187390f3.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/deactivate-gxx_linux-64.sh: Syntax error: "(" unexpected Error in Sys.setenv(PATH = new_path) : wrong length for argument In addition: Warning message: In system2(Sys.which("sh"), fi, stdout = if (identical(intern, FALSE)) "" else intern) : running command ''/bin/sh' /tmp/RtmprsuJU8/filea035187390f3.sh' had status 2

How could I solve this problem? thank you.

ccgBiotechLover commented 2 years ago

actually, I installed Giotto successfully under conda environment, and files lile geotiff-deactivate.sh are in the directory with permission.

ccgBiotechLover commented 2 years ago

packageVersion("Giotto"):‘1.1.1’ R version 4.0.5 (2021-03-31)

Giotto:::checkGiottoEnvironment() giotto environment found at /newdata/chencg/.local/share/r-miniconda/envs/giotto_env/bin/python /tmp/RtmprsuJU8/filea03520c8893a.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/udunits2-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea03520c8893a.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/geotiff-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea03520c8893a.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/gdal-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea03520c8893a.sh: 11: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/gdal-deactivate.sh: [[: not found /tmp/RtmprsuJU8/filea03520c8893a.sh: 4: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/deactivate-r-base.sh: [[: not found /tmp/RtmprsuJU8/filea03520c8893a.sh: 5: /home/cuim/miniconda3/envs/R403/etc/conda/deactivate.d/deactivate-gxx_linux-64.sh: Syntax error: "(" unexpected Error in Sys.setenv(PATH = new_path) : wrong length for argument In addition: Warning message: In system2(Sys.which("sh"), fi, stdout = if (identical(intern, FALSE)) "" else intern) : running command ''/bin/sh' /tmp/RtmprsuJU8/filea03520c8893a.sh' had status 2

RubD commented 1 year ago

Not sure if this is resolved, but closing this with some general suggestions:

  1. The easiest way to install your giotto environment is with installGiottoEnvironment() . You only need to do this the first time you start using Giotto. In fact, it will not install the environment if it already detects an existing one.

  2. use checkGiottoEnvironment() to test if you giotto environment is properly installed.

  3. use installGiottoEnvironment(force_environment = TRUE) to force reinstall the giotto environment. This is useful if you think something went wrong or you want to install an updated version of the python packages.

  4. use installGiottoEnvironment(force_miniconda = TRUE, force_environment = TRUE) to force reinstall both the miniconda and giotto environment. CAUTION: this will remove all environments associated with the miniconda installation, including those potentially used by other packages.