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

Failed to install DTR-phage-pipeline #6

Open
JiaLonghao1997 opened this issue Sep 15, 2020 · 5 comments
Open

Failed to install DTR-phage-pipeline #6

JiaLonghao1997 opened this issue Sep 15, 2020 · 5 comments

Comments

@JiaLonghao1997
Copy link

image

After run:

conda env create -f environment.yml
conda activate DTR-phage-pipeline
snakemake --use-conda -p -r -j 10

I got the error,
-bash: /home1/jialh/tools/miniconda3/envs/DTR-phage-pipeline/bin/snakemake: /home1/jialh/tools/miniconda3/envs/DTR-phage-pipeline/bin/python3.8: bad interpreter: Invalid argument

@jmeppley
Copy link
Contributor

jmeppley commented Sep 15, 2020 via email

@jmeppley
Copy link
Contributor

jmeppley commented Sep 16, 2020

I've looked into this a little more.

First, my suggestion above was not 100% correct. That will get you python 3.7.0. To get the latest python 3.7 the environment.yml file should look like this:

name: DTR-phage-pipeline
channels:
  - conda-forge
  - bioconda
dependencies:
  - python = 3.7.*
  - snakemake >= 5.14.0
  - matplotlib
  - click
  - pandas
  - requests

The double equals (==) gives you python 3.7.0. The latest right now is 3.7.8.

Second, I'm unable to reproduce this bug. The test workflow is running just fine for me under python 3.8. I think your conda installation didn't work correctly.

Try running just "snakemake -h" to confirm. I suspect you'll get the same error.

The "bash: ... bad interpreter ..." coming from snakemake means that BASH can't figure out how to run snakemake. Common causes are your python executable is corrupt or non-executable or the #! line that starts the snakemake script is corrupted.

Are you using Docker or other container service? The "bad interpreter: invalid argument" error seems to often be related to a corrupt docker filesystem.

@JiaLonghao1997
Copy link
Author

I've looked into this a little more.

First, my suggestion above was not 100% correct. That will get you python 3.7.0. To get the latest python 3.7 the environment.yml file should look like this:

name: DTR-phage-pipeline
channels:
  - conda-forge
  - bioconda
dependencies:
  - python = 3.7.*
  - snakemake >= 5.14.0
  - matplotlib
  - click
  - pandas
  - requests

The double equals (==) gives you python 3.7.0. The latest right now is 3.7.8.

Second, I'm unable to reproduce this bug. The test workflow is running just fine for me under python 3.8. I think your conda installation didn't work correctly.

Try running just "snakemake -h" to confirm. I suspect you'll get the same error.

The "bash: ... bad interpreter ..." coming from snakemake means that BASH can't figure out how to run snakemake. Common causes are you're python executable is corrupt or non-executable or the #! line that starts the snakemake script is corrupted.

Are you using Docker or other container service? The "bad interpreter: invalid argument" error seems to often be related to a corrupt docker filesystem.

Thank you! I will have a try.

@JiaLonghao1997
Copy link
Author

JiaLonghao1997 commented Sep 23, 2020

I don't use Docker or other container service.
Environment.yml file look like this:

name: DTR-phage-pipeline
channels:
  - conda-forge
  - bioconda
dependencies:
  - python == 3.7.*
  - snakemake >= 5.14.0
  - matplotlib
  - click
  - pandas
  - requests

Then I,

conda remove -n DTR-phage-pipeline --all
conda env create -f environment.yml
snakemake -h     #I don't get the same error.
snakemake --use-conda -p -r -j 10

Everything at the begining is great. However, I got another errors. How do I control the version of the package?
image

@jmeppley
Copy link
Contributor

Snakemake is trying to build dedicated conda environments for some of the workflow steps. These are defined in the envs/*.yml files. You can adjust the version requirements in those.

What operating system are you using?

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