Basic pynomo instructions not working

Adam Funk a24061 at
Mon Dec 10 04:25:59 EST 2018

On 2018-11-22, dieter wrote:

> The "pynomo" version you have installed may have been developped for
> Python 2 and not run in "python3".
> In Python 2, you have implicit relative imports.
> As an example, it allows modules in the package "pynomo"
> to use "import nomo_wrapper" to import the submodule "nomo_wrapper".
> Python 3 has discarded implicit relative imports. In
> the example above, "import nomo_wrapper" must become
> "from . import nomo_wrapper" (explicit relative import)
> or "import pynomo.nomo_wrapper as nomo_wrapper" (absolute import).
> For the time being, you still find many packages which run
> only under Python 2. Failing relative imports or syntax errors
> are a frequent indication towards this.

Yup, that's the problem --- it does work in Python 2.  I didn't think
of that at first because there was a pip3 package for it!

Growth for growth's sake is the ideology of the cancer cell.
                                             ---Edward Abbey

More information about the Python-list mailing list