Advertisement
Guest User

Untitled

a guest
Oct 31st, 2018
300
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. $ python3.7
  2. Python 3.7.0 (default, Sep 12 2018, 18:30:08)
  3. [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> from distutils.version import LooseVersion
  6. >>> LooseVersion('7') > LooseVersion('xp')
  7. Traceback (most recent call last):
  8. File "<stdin>", line 1, in <module>
  9. File "/usr/lib/python3.7/distutils/version.py", line 64, in __gt__
  10. c = self._cmp(other)
  11. File "/usr/lib/python3.7/distutils/version.py", line 337, in _cmp
  12. if self.version < other.version:
  13. TypeError: '<' not supported between instances of 'int' and 'str'
  14. Error in sys.excepthook:
  15. Traceback (most recent call last):
  16. File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
  17. from apport.fileutils import likely_packaged, get_recent_crashes
  18. File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
  19. from apport.report import Report
  20. File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
  21. import apport.fileutils
  22. File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
  23. from apport.packaging_impl import impl as packaging
  24. File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
  25. import apt
  26. File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
  27. import apt_pkg
  28. ModuleNotFoundError: No module named 'apt_pkg'
  29.  
  30. Original exception was:
  31. Traceback (most recent call last):
  32. File "<stdin>", line 1, in <module>
  33. File "/usr/lib/python3.7/distutils/version.py", line 64, in __gt__
  34. c = self._cmp(other)
  35. File "/usr/lib/python3.7/distutils/version.py", line 337, in _cmp
  36. if self.version < other.version:
  37. TypeError: '<' not supported between instances of 'int' and 'str'
  38. >>>
  39.  
  40. $ python2.7
  41. Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
  42. [GCC 7.3.0] on linux2
  43. Type "help", "copyright", "credits" or "license" for more information.
  44. >>> from distutils.version import LooseVersion
  45. >>> LooseVersion('7') > LooseVersion('xp')
  46. False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement