Importing Orange returns “ImportError: no module named orange”

后端 未结 1 504
面向向阳花
面向向阳花 2021-01-19 16:06

I\'d like to use the Orange package for scientific analysis . Installation on x86_64 Ubuntu 12.04, with Python 2.7.3, went well, using sudo e

相关标签:
1条回答
  • 2021-01-19 16:39

    The semantics for importing Orange have changed around version 2.5. If using code written with a previous version, some changes must be made, see http://orange.biolab.si/blog/2011/12/20/orange-25-code-conversion/. Critically, one needs to replace:

    import orange
    

    with:

    import Orange
    

    (note the capital letter O in the second example).

    A side effect is that other sub-modules no longer need to be explicitly imported; a single

    import Orange
    

    is enough, instead of e.g.

    import orange, orngTest, orngStat, orngTree
    
    0 讨论(0)
提交回复
热议问题