Autocomplete Problems with Pyomo and oemof



Hello there,

I have a problem after install pyomo.

If I try to import pyomo in Spyder or jupyter notebook like so:

“import pyomo as py”

The autocomplete function don’t working for this library, but for any other library or variable it is still working.

I have installed pyomo in anaconda in an oemof environment.

Have anyone this problem too and have anyone a idea for this problem?




Hi Alex,

I have installed pyomo in anaconda in an oemof environment.

Can you outline the steps you have undertaken for this?

Spyder normally uses Anacondas ‘default’ environment. If you have created another one for the installation oemof, pyomo, etc. these packages cannot be found in the ‘default’ env. You either have to activate the specific environment our you could use Anacondas default environment (among other options).



Hello CKaldemeyer, thanks for your response.

With “defaul” environemt do you mean the root environment?

The single steps have been:

  • to create a virtuell envirnoment in anaconda (with: conda create -n oemof python=3.4 pip)
    -to call the oemof envirnoment in the anaconda promp(with: “activate oemof”)
    -to install spyder (with: “conda install spyder”)
    -to install oemof (with: “pip install oemof”)
    -to install the cbc-Solver (put the cbc.exe in the oemof path)
    -to install oemof.db (with “pip install -e git://”
    -to install pyomo (with: “conda install -c conda-forge pyomo”)

I’m starting spyder each time in the oemof envirnoment.

Spyder, oemof and all are working fine excet the autocomplete from the pyomo libary. I’m a little bit confused.

Do I have do any other installation or taking other setting in Spyder maybe?



Thanks for your explanation. Then, I think it will be related to Spyder and IPython/Jupyter I guess. As I am not using Spyder as an editor I cannot check it myself but google lists a lot of pages about a not working autocompletition in Spyder/Jupyter.

During the time when I had used Spyder I have made good experiences with Spyders’ github project and put my questions there. One of the main developers (Carlos Cordoba) replies quite quickly. He is also active on stackoverflow so both channels might be useful.

Hope that helps!



Ok thanks, I guess it will help, I’m seeking there for a solution.

I will post than the solution in this thread for other people.



It shows like so that some modules in python have problems with the autocomplete function.


Hello there, I have a solution for the problem.

After I import pyomo like so:

import pyomo.environ as po

And not anymore with the star operator:

from coopr.pyomo import *

The autocomplete function works without any problems.