IsoQuant icon indicating copy to clipboard operation
IsoQuant copied to clipboard

ModuleNotFoundError: No module named 'pysam'

Open maronem opened this issue 1 year ago • 1 comments

I have tried installing IsoQuant using both conda and manual installation but regardless of method I get the error ModuleNotFoundError: No module named 'pysam' when isoquant.py tries to import pysam.

(isoquant) Michaels-MacBook-Pro-3:IsoQuant michael$ ./isoquant.py --test
Traceback (most recent call last):
  File "/Users/michael/IsoQuant/./isoquant.py", line 22, in <module>
    import pysam
ModuleNotFoundError: No module named 'pysam'

I have tried setting up environments using multiple versions of python but have had no success. Here are the packages installed in my environment (which pysam is) with both minimap2 and samtools in my $PATH.

# packages in environment at /Users/michael/miniforge3/envs/isoquant:
#
# Name                    Version                   Build  Channel
argcomplete               3.5.2                    pypi_0    pypi
argh                      0.31.3                   pypi_0    pypi
biopython                 1.84                     pypi_0    pypi
bzip2                     1.0.8                h6c40b1e_6  
ca-certificates           2024.11.26           hecd8cb5_0  
contourpy                 1.3.1                    pypi_0    pypi
cycler                    0.12.1                   pypi_0    pypi
fonttools                 4.55.2                   pypi_0    pypi
gffutils                  0.13                     pypi_0    pypi
importlib-metadata        8.5.0                    pypi_0    pypi
kiwisolver                1.4.7                    pypi_0    pypi
libffi                    3.4.4                hecd8cb5_1  
matplotlib                3.9.3                    pypi_0    pypi
ncurses                   6.4                  hcec6c5f_0  
numpy                     2.2.0                    pypi_0    pypi
openssl                   3.0.15               h46256e1_0  
packaging                 24.2                     pypi_0    pypi
pandas                    2.2.3                    pypi_0    pypi
pillow                    11.0.0                   pypi_0    pypi
pip                       24.2            py311hecd8cb5_0  
pybedtools                0.10.0                   pypi_0    pypi
pyfaidx                   0.8.1.3                  pypi_0    pypi
pyparsing                 3.2.0                    pypi_0    pypi
pysam                     0.22.1                   pypi_0    pypi
python                    3.11.10              h4d6d9e5_0  
python-dateutil           2.9.0.post0              pypi_0    pypi
pytz                      2024.2                   pypi_0    pypi
pyyaml                    6.0.2                    pypi_0    pypi
readline                  8.2                  hca72f7f_0  
scipy                     1.14.1                   pypi_0    pypi
seaborn                   0.13.2                   pypi_0    pypi
setuptools                75.1.0          py311hecd8cb5_0  
simplejson                3.19.3                   pypi_0    pypi
six                       1.17.0                   pypi_0    pypi
sqlite                    3.45.3               h6c40b1e_0  
tk                        8.6.14               h4d00af3_0  
tzdata                    2024.2                   pypi_0    pypi
wheel                     0.44.0          py311hecd8cb5_0  
xz                        5.4.6                h6c40b1e_1  
zipp                      3.21.0                   pypi_0    pypi
zlib                      1.2.13               h4b97444_1  

Any help would be much appreciated!

maronem avatar Dec 09 '24 20:12 maronem

Dear @maronem

This is strange. What happens if you simply run python3 and run import pysam?

Best Andrey

andrewprzh avatar Dec 11 '24 14:12 andrewprzh

Please, reopen if the issue is still there.

andrewprzh avatar May 19 '25 09:05 andrewprzh