Error importing module while running bash5tools.py
1
0
Entering edit mode
6.3 years ago

Hi

I am trying the following command and getting the below error:

[root@bioinfo11-c pbcore-master]# python bash5tools.py –readtype subread m170310_201949_42146_c101159442550000001823267305221712_s1_p0.1.bax.h5 
Traceback (most recent call last):
  File "bash5tools.py", line 38, in <module>
    from pbh5tools._version import __version__
ImportError: No module named pbh5tools._version
[root@bioinfo11-c pbcore-master]# python bash5tools.py –readtype subread m170310_201949_42146_c101159442550000001823267305221712_s1_p0.1.bax.h5 
Traceback (most recent call last):
  File "bash5tools.py", line 38, in <module>
    from pbh5tools._version import __version__
ImportError: No module named pbh5tools._version

It is obvious from the error that the required module is absent, however, when I try to install it, it seems no such module exists

[root@bioinfo11-c pbcore-master]# python bash5tools.py –readtype subread m170310_201949_42146_c101159442550000001823267305221712_s1_p0.1.bax.h5 
Traceback (most recent call last):
  File "bash5tools.py", line 38, in <module>
    from pbh5tools._version import __version__
ImportError: No module named pbh5tools._version
[root@bioinfo11-c pbcore-master]# pip install pbh5tools._version
Collecting pbh5tools._version
/usr/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
/usr/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
  Could not find a version that satisfies the requirement pbh5tools._version (from versions: )
No matching distribution found for pbh5tools._version

I am using Pyton v2.7. Any help would be highly appreciated.

Thanks


NOTE: I am cross-posting this on biostars after waiting for 2 days.

Earlier posted here - https://github.com/PacificBiosciences/pbh5tools/issues/33

pacbio bam fastq bash5tools.py • 1.7k views
ADD COMMENT
1
Entering edit mode

NOTE: I am cross-posting this on biostars after waiting for 2 days.

PacBio is located in the US where many life science related businesses are currently closed for entire week (end of year). Don't expect to get an answer until work resumes next week.

BTW: running user software from a root account is not a good idea.

ADD REPLY
0
Entering edit mode

PacBio is located in the US where many life science related businesses are currently closed for entire week (end of year). Don't expect to get an answer until work resumes next week.

That was exactly the reason why I dint wait much!

BTW: running user software from a root account is not a good idea

Thanks, but its not working either way :)

ADD REPLY
0
Entering edit mode

Did either of the two suggestions below not work?

ADD REPLY
0
Entering edit mode

try searching pip (and pip3) repos and apt repos on your local machine. It seems pbh5tools module doesn't exist in pip repos (at least when I searched on my machine). However they seem to be present in apt repos. Try installing it.

$ apt-cache search pbh5tools
pbh5tools - tools for manipulating Pacific Biosciences HDF5 files
python-pbh5tools - tools for manipulating Pacific Biosciences HDF5 files -- Python 2 library
python-pbh5tools-doc - tools for manipulating HDF5 files produced by Pacific Biosciences (doc)

You can use either apt-cache or apt-file to search in deb based distros. On RPM based, try using yum to search.

try installing python-pbh5tools.

machine I tried:

$ uname -a
Linux machine name 4.13.0-17-generic #20-Ubuntu SMP Mon Nov 6 10:04:08 UTC 2017 x86_64 GNU/Linux

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=17.10
DISTRIB_CODENAME=artful
DISTRIB_DESCRIPTION="Ubuntu 17.10"
ADD REPLY
0
Entering edit mode
6.3 years ago

I know nothing about this package but maybe the error is due to the fact you haven't installed it properly using something like:

git clone https://github.com/PacificBiosciences/pbh5tools.git
cd pbh5tools
python setup.py install

Maybe you have downloaded the source code and you are trying to execute the bash5tools.py without installing the associated modules?

ADD COMMENT

Login before adding your answer.

Traffic: 1993 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6