using packages with conda
1
0
Entering edit mode
9 weeks ago
raquel • 0

Hello everyone

I ran

conda create -n scinkd -c conda-forge -c bioconda r-base r-dplyr r-ggplot2 snakemake meryl pigz samtools

conda init bash

conda activate scinkd

But then I wanted to use the package snakemake and ran

snakemake --use-conda   -np -s SCINKD/SCINKD.v2.1.0.FULL.snakefile

And I got the message

bash: snakemake: command not found

I'm following the SCINKD pipeline but they never mention needing to load anything else. What am I missing? After loading packages to conda do I have to manually load the ones I need to use?

Thanks

snakemake conda scinkd • 1.9k views
ADD COMMENT
0
Entering edit mode

Cannot reproduce. Is this run via some sort of server/HPC/scheduler/something?

ADD REPLY
0
Entering edit mode

Yes, I'm using SSH session

ADD REPLY
0
Entering edit mode

Just to be sure: You ssh into a remote server, correct? Die you setup the conda environment on your local machine or the remote? Must be the remote.

ADD REPLY
0
Entering edit mode
17 days ago
Kevin Blighe ★ 90k

The issue likely stems from conda init bash not fully taking effect in your current SSH session. Conda modifies your ~/.bashrc file, but changes aren't applied until you reload the shell.

Try sourcing your bashrc file after activation:

source ~/.bashrc

Then, verify if snakemake is accessible with which snakemake. If it's still not found, log out of SSH and log back in to start a fresh session where conda's paths are properly loaded.

Ensure the environment was created on the remote server, not locally. You can check installed packages with conda list inside the activated env to confirm snakemake is there.

No need to manually load packages beyond activation—conda handles the PATH. If issues persist, update conda (conda update conda) and recreate the env, as older versions sometimes glitch with snakemake.

This should resolve it without additional tools.

Kevin

ADD COMMENT

Login before adding your answer.

Traffic: 3378 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6