python3和RO包以及DS9

时间:2016-06-08 11:27:10

标签: python python-3.x

如何让RO包在Python 3中运行?我设法让它在Python 2.7中运行,但是当我以python3 setup.py install手动安装它然后执行import RO.DS9时,我得到了这个:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/RO-3.6.9-py3.4.egg/RO/DS9.py", line 160, in <module>
    import RO.OS
  File "/usr/local/lib/python3.4/dist-packages/RO-3.6.9-py3.4.egg/RO/OS/__init__.py", line 7, in <module>
    from .OSUtil import *
  File "/usr/local/lib/python3.4/dist-packages/RO-3.6.9-py3.4.egg/RO/OS/OSUtil.py", line 31, in <module>
    import RO.SeqUtil
  File "/usr/local/lib/python3.4/dist-packages/RO-3.6.9-py3.4.egg/RO/SeqUtil.py", line 33, in <module>
    import UserString
ImportError: No module named 'UserString'
>>> exit()

1 个答案:

答案 0 :(得分:1)

在Python 3中,UserString is part of the collections module

正如您在the RO page上看到的,此库仅支持Python 2.6和2.7。