Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating conda environment [exit code 9] #26

Open
LiuCanidk opened this issue Dec 18, 2024 · 1 comment
Open

Error creating conda environment [exit code 9] #26

LiuCanidk opened this issue Dec 18, 2024 · 1 comment

Comments

@LiuCanidk
Copy link

Hi, I successfully installed SeurateExtend in a linux server, but failed to install the corresponding conda environment where all python dependencies should be placed. I checked the system and ensured that the git and conda were installed.

First, I try create_condaenv_seuratextend() in the R session, and it came out with the error below:
image

Then I search in the engine and tried removing the cache files of conda using mamba clean -all (I prefer mamba rather than conda):
image
But the create_condaenv_seuratextend still did not work (same error above)

Then I tried directly using mamba and the yml file provided in the package:

mamba env create -f /work/home/liucan666/R/x86_64-conda-linux-gnu-library/4.3/SeuratExtend/extdata/environment-linux.yml

It throwed some messages, no error but stopped quickly. No standard output such as "preparing the execution" and no environment created.
image

image

image

How should I solve it? My mamba version is 1.5.6, the corresponding conda version is 23.11.0, the Linux system is CentOS 7.6.

I doubt it was associated with the error message: /opt/anaconda/bin/conda env create --quiet --name seuratextend -f /work/home/liucan666/R/x86_64-conda-linux-gnu-library/4.3/SeuratExtend/extdata/environment-linux.yml, which seemed not to be my installed conda. But the trial of the command line with mamba also failed.

@huayc09
Copy link
Owner

huayc09 commented Dec 20, 2024

Thank you for the detailed report and for providing your system information. Let me share my analysis and a potential solution:

First, I ruled out CentOS compatibility as the root cause. I tested the create_condaenv_seuratextend() function on a clean CentOS 7 x86 cloud server, and it worked successfully. So the package should be compatible with CentOS systems.

Looking at your error logs, I suspect this is a permissions issue. The key clue is the exit code 9 in your error message. Additionally, I notice that reticulate is trying to use a system-wide conda installation at /opt/anaconda/bin/conda. This suggests that your server has a pre-installed conda managed by the system administrator. Without admin privileges, when you run create_condaenv_seuratextend(), reticulate attempts to use this system conda but lacks the necessary permissions to create environments or modify certain directories.

Here's a potential solution you can try: Use reticulate to install a local miniconda installation. Since this would be installed in your user space, you would have full permissions to manage it. This should allow reticulate to create and manage environments without encountering permission errors. You can do this by running:

reticulate::install_miniconda()

After installing the local miniconda, try running create_condaenv_seuratextend() again. This should bypass the exit code 9 permission error since reticulate would be using your user-owned miniconda installation.

Let me know if this works for you or if you encounter any other issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants