Closed AngelosKoz closed 4 months ago
I think the error CondaError: Run 'conda init' before 'conda activate'
would happen if the conda setup code isn't being run. build_rmats
sources https://github.com/Xinglab/rmats-turbo/blob/v4.3.0/setup_environment.sh#L21 which sources your .bashrc
which should have lines like:
# >>> conda initialize >>>
__conda_setup=...
Maybe there is some other code in your .bashrc
which prevents the conda setup from being run from a non-interactive script. You could try copying that conda setup code directly into build_rmats
before the conda activate
command. If that doesn't work I would suggest trying to make a very minimal example of conda activate not working for you from a bash script and posting that to https://github.com/conda/conda/issues
Your build without --conda
looks like it worked and you should be able to run python rmats.py --help
. It's not necessary to run test_rmats
. That script uses a different conda environment to run automated tests. Since conda activate is not working for you with these scripts I don't think you'll be able to run test_rmats
I think the error
CondaError: Run 'conda init' before 'conda activate'
would happen if the conda setup code isn't being run.build_rmats
sources https://github.com/Xinglab/rmats-turbo/blob/v4.3.0/setup_environment.sh#L21 which sources your.bashrc
which should have lines like:# >>> conda initialize >>> __conda_setup=...
Maybe there is some other code in your
.bashrc
which prevents the conda setup from being run from a non-interactive script. You could try copying that conda setup code directly intobuild_rmats
before theconda activate
command. If that doesn't work I would suggest trying to make a very minimal example of conda activate not working for you from a bash script and posting that to https://github.com/conda/conda/issuesYour build without
--conda
looks like it worked and you should be able to runpython rmats.py --help
. It's not necessary to runtest_rmats
. That script uses a different conda environment to run automated tests. Since conda activate is not working for you with these scripts I don't think you'll be able to runtest_rmats
Thank you very much this worked like a charm, all i had to do was add in both the build_rmats (after local CONDA_ENV_PATH="${SCRIPT_DIR}/conda_envs/rmats"
) and setup_environment.sh (before first function) scripts the conda initialize part from the bashrc. Again thank you for the fast and accurate response.
# >>> conda initialize >>>
__conda_setup=...
...
unset __conda_setup
# <<< conda initialize <<<
Hello,
So after cloning the repository and installing all the dependencies, I am trying to run build_rmats --conda, but keep getting the following error:
build_rmats --conda
Running with y to remove existing environment:
Tried the following solutions in different combinations which I found for said error, but I am not sure what i am missing here, sorry if this happens to be lack of knowledge on my part. _The rmatspy36 is an environment where I installed specifically python 3.6.12 and Cython 0.29.21 before running
build_rmats --conda
source ~/.bashrc
conda init bash
conda init
conda activate /home/angelosk/rmats_turbo_dir/rmats-turbo/conda_envs/rmats
conda activate rmats_py36
As an extra step, I have tried to run the installation process without the --conda flag and it seems to be working, but again cannot run test_rmats, prompting to the same error. The following messages are prompted after running
build_rmats
for the second time (PAIRADISE and DARTS have also been cloned):Thank you in advance for any assistance.