rrazaghi / modbamtools

Set of tools to manipulate and visualize modified base bam files
Apache License 2.0
49 stars 4 forks source link

Installing modbamtools/0.4.8 on python/3.10 lacking package of libmodbampy #17

Open qiyubio opened 2 years ago

qiyubio commented 2 years ago

Hi, I was trying to install modbamtools/0.4.8 on python/3.10, and found that libmodbampy is lacking. But installing on python/3.9 is fine. Since libmodbampy is part of modbampy, not sure if it is the modbampy's problem. Wondering if anyone else see this? Just post here in case others have the same problem.

On python/3.10, the build finish, but there is no libmodbampy:

micromamba create -n 0.4.8 -c conda-forge python=3.10 \
                    pip
micromamba activate 0.4.8
pip install modbamtools==0.4.8

Running modbamtools plot:

modbamtools plot --help
Traceback (most recent call last):
  File "/opt/conda/envs/0.4.8/bin/modbamtools", line 5, in <module>
    from modbamtools.cli import cli
  File "/opt/conda/envs/0.4.8/lib/python3.10/site-packages/modbamtools/cli.py", line 2, in <module>
    from modbamtools.modbamviz import *
  File "/opt/conda/envs/0.4.8/lib/python3.10/site-packages/modbamtools/modbamviz.py", line 1, in <module>
    from modbamtools.utils import *
  File "/opt/conda/envs/0.4.8/lib/python3.10/site-packages/modbamtools/utils.py", line 12, in <module>
    from modbampy import *
  File "/opt/conda/envs/0.4.8/lib/python3.10/site-packages/modbampy/__init__.py", line 8, in <module>
    import libmodbampy
ModuleNotFoundError: No module named 'libmodbampy'

Try to locate the package with python:

 python -c "import modbampy"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/opt/conda/envs/0.4.8/lib/python3.10/site-packages/modbampy/__init__.py", line 8, in <module>
    import libmodbampy
ModuleNotFoundError: No module named 'libmodbampy'

Works fine on python/3.9:

micromamba create -n 0.4.8 -c conda-forge python=3.9 \
                    pip
micromamba activate 0.4.8
pip install modbamtools==0.4.8
python -c "import modbampy; print(modbampy.__version__);print(modbampy.__path__)"
0.5.3
['/opt/conda/envs/0.4.8/lib/python3.9/site-packages/modbampy']
rrazaghi commented 2 years ago

Hi! yes I'm aware of this and I think there's something wrong with modbampy 3.10 wheels on their end. I'll investigate and try to fix. Thanks!

alanlorenzetti commented 2 years ago

Hi everyone. I am having the same issue. Would you have a way to work it around?

Using conda, I created clean environments with python (3.8, 3.9, and 3.10) and tried to install modbamtools using pip. Python 3.8 and 3.9 finish the installation successfully, but I can't run the software due to the libmodbampy issue.

I tried the approach below using Arch Linux and OS X (Mac). The examples are on OS X.

Python 3.8

Command:

conda create -y -n modbamtools_38 -c conda-forge python=3.8
conda activate modbamtools_38
pip install modbamtools
modbamtools --help

Output:

Traceback (most recent call last):
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_38/bin/modbamtools", line 5, in <module>
    from modbamtools.cli import cli
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_38/lib/python3.8/site-packages/modbamtools/cli.py", line 2, in <module>
    from modbamtools.modbamviz import *
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_38/lib/python3.8/site-packages/modbamtools/modbamviz.py", line 1, in <module>
    from modbamtools.utils import *
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_38/lib/python3.8/site-packages/modbamtools/utils.py", line 12, in <module>
    from modbampy import *
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_38/lib/python3.8/site-packages/modbampy/__init__.py", line 8, in <module>
    import libmodbampy
ModuleNotFoundError: No module named 'libmodbampy'

Python 3.9

Command:

conda create -y -n modbamtools_39 -c conda-forge python=3.9
conda activate modbamtools_39
pip install modbamtools
modbamtools --help

Output:

Traceback (most recent call last):
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_39/bin/modbamtools", line 5, in <module>
    from modbamtools.cli import cli
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_39/lib/python3.9/site-packages/modbamtools/cli.py", line 2, in <module>
    from modbamtools.modbamviz import *
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_39/lib/python3.9/site-packages/modbamtools/modbamviz.py", line 1, in <module>
    from modbamtools.utils import *
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_39/lib/python3.9/site-packages/modbamtools/utils.py", line 12, in <module>
    from modbampy import *
  File "/usr/local/Caskroom/miniconda/base/envs/modbamtools_39/lib/python3.9/site-packages/modbampy/__init__.py", line 8, in <module>
    import libmodbampy
ModuleNotFoundError: No module named 'libmodbampy'

Python 3.10

Command:

conda create -y -n modbamtools_310 -c conda-forge python=3.10
conda activate modbamtools_310
pip install modbamtools

Output:

ERROR: Ignored the following versions that require a different python version: 0.1.0 Requires-Python >=3.6, <=3.8.12; 0.1.3 Requires-Python >=3.6, <=3.8.12; 0.1.4 Requires-Python >=3.6, <=3.8.12; 0.2.0 Requires-Python >=3.6, <=3.8.12; 0.2.2 Requires-Python >=3.6, <=3.8.12; 0.3.1 Requires-Python >=3.8, <=3.8.12; 0.3.2 Requires-Python >=3.8, <=3.8.12; 0.4.0 Requires-Python >=3.8, <=3.8.12; 0.4.1 Requires-Python >=3.8, <=3.8.12; 0.4.2 Requires-Python >=3.8, <=3.8.12; 0.4.3 Requires-Python >=3.8, <=3.8.12; 0.4.4 Requires-Python >=3.8, <=3.8.12; 0.4.5 Requires-Python >=3.8, <=3.8.12; 0.4.6 Requires-Python >=3.8, <=3.8.12; 0.4.8 Requires-Python >=3.8, <=3.10.5
ERROR: Could not find a version that satisfies the requirement modbamtools (from versions: none)
ERROR: No matching distribution found for modbamtools
ONT-Tseng commented 2 years ago

Having the same issue here. I used Anaconda to create either python3.8 or 3.9. It reported error below:

Traceback (most recent call last): File "/Users/apple/opt/anaconda3/envs/ONT_methylation/bin/modbamtools", line 5, in from modbamtools.cli import cli File "/Users/apple/opt/anaconda3/envs/ONT_methylation/lib/python3.8/site-packages/modbamtools/cli.py", line 2, in from modbamtools.modbamviz import File "/Users/apple/opt/anaconda3/envs/ONT_methylation/lib/python3.8/site-packages/modbamtools/modbamviz.py", line 1, in from modbamtools.utils import File "/Users/apple/opt/anaconda3/envs/ONT_methylation/lib/python3.8/site-packages/modbamtools/utils.py", line 12, in from modbampy import * File "/Users/apple/opt/anaconda3/envs/ONT_methylation/lib/python3.8/site-packages/modbampy/init.py", line 8, in import libmodbampy ModuleNotFoundError: No module named 'libmodbampy'

alanlorenzetti commented 2 years ago

Hi everyone,

Today I was able to install modbamtools by running:

conda create -n modbamtools_env38 python=3.8
conda activate modbamtools_env38
pip install modbampy
pip install modbamtools

Maybe everything was sorted out on PyPI side?

Thanks.

syedislamuddin commented 1 year ago

Hi, Is this resolved. I am getting this error: ModuleNotFoundError: No module named 'libmodbampy'

Tried on clean python 3.8, 3.9 conda environment.

nsgarcia27 commented 1 year ago

Same here. Still getting the "No module named 'libmodbampy'" error

keenhl commented 1 year ago

I'm also getting the ModuleNotFoundError: No module named 'libmodbampy' on python 3.8.