im am using Linux Ubuntu on a Virtual machine on Windows 10.
I have downloaded a IPython Notebook from dms_tools
Now when I try to run certain parts of the code I become the following error:
/usr/lib/python3.8/distutils/version.py in _cmp(self, other)
335 if self.version == other.version:
336 return 0
--> 337 if self.version < other.version:
338 return -1
339 if self.version > other.version:
TypeError: '<' not supported between instances of 'str' and 'int'
Since I did not know, hot to solve this problem I decided to just eddit this version.py file (perhaps not so smart, but I did not know what else to do...)
I just decided to Comment the faulty lines and return 0 everytime.
Now the weird part, I still get the same error pointing on the comments:
/usr/lib/python3.8/distutils/version.py in _cmp(self, other)
335 # if self.version == other.version:
336 # return 0
--> 337 # if self.version < other.version:
338 # return -1
339 # if self.version > other.version:
TypeError: '<' not supported between instances of 'str' and 'int'
Now I tested what would happen if I just added some empty new lines and the error looks like this (pointing at the same line, where nothing even is):
/usr/lib/python3.8/distutils/version.py in _cmp(self, other)
335
336
--> 337
338
339
TypeError: '<' not supported between instances of 'str' and 'int'
I just can not explain what is happening here and I hope someone has an idea.
The complete Traceback is:
TypeError Traceback (most recent call last)
/tmp/ipykernel_2888/2193680867.py in <module>
1 fastqdir = os.path.join(resultsdir, './FASTQ_files/')
2 print("Downloading FASTQ files from the SRA...")
----> 3 dms_tools2.sra.fastqFromSRA(
4 samples=samples,
5 fastq_dump='/home/andreas/sratoolkit.2.11.0-ubuntu64/bin/fastq-dump',
~/.local/lib/python3.8/site-packages/dms_tools2/sra.py in fastqFromSRA(samples, fastq_dump, fastqdir, aspera, overwrite, passonly, no_downloads, ncpus)
91 .decode('utf-8').split(':')[-1].strip())
92 fastq_dump_minversion = '2.8'
---> 93 if not (distutils.version.LooseVersion(fastq_dump_version) >=
94 distutils.version.LooseVersion(fastq_dump_minversion)):
95 raise RuntimeError("fastq-dump version {0} is installed. You need "
/usr/lib/python3.8/distutils/version.py in __ge__(self, other)
68
69 def __ge__(self, other):
---> 70 c = self._cmp(other)
71 if c is NotImplemented:
72 return c
/usr/lib/python3.8/distutils/version.py in _cmp(self, other)
335 if self.version == other.version:
336 return 0
--> 337 if self.version < other.version:
338 return -1
339 if self.version > other.version:
TypeError: '<' not supported between instances of 'str' and 'int'