treangenlab / emu

MIT License
32 stars 4 forks source link

ModuleNotFoundError: No module named 'pysam' #10

Closed DorotheeBerthold closed 3 months ago

DorotheeBerthold commented 4 months ago

During the conda-based installation of emu, the python environment in the emu file is defined as #!/usr/bin/env python3 However, this later on leads to the error "ModuleNotFoundError: No module named 'pysam'" when running emu abundance

After some investigation, we found out that changing the '#!/usr/bin/env python3' to '#!/usr/bin/env python' solves the issue. Python3 is linked to python 3.12 whereas python is linked to python 3.7.12

kdc10 commented 3 months ago

The path which python3 points to is dependent on how your environment is set up. You can alternatively alter your systems path to send python3 to whichever version your modules (i.e. pysam) are installed. https://stackoverflow.com/questions/43743509/how-to-make-python3-command-run-python-3-6-instead-of-3-5

Your solution is likely to work as well! Whichever you prefer.