Installing pyomo on python3

307 views
Skip to first unread message

lbertolotti

unread,
Dec 29, 2014, 2:33:53 PM12/29/14
to pyomo...@googlegroups.com
Has the site been changed recently? my old optimization files are giving me:

 File "costfunction.py", line 3, in <module>
    import test
  File "/home/lucas/costfunc/test.py", line 2, in <module>
    from coopr.pyomo import *
ImportError: No module named 'coopr'

I need an official guide for installing pyomo on Ubuntu14.04

David Woodruff

unread,
Dec 29, 2014, 6:35:10 PM12/29/14
to pyomo...@googlegroups.com

There will be a new release coming out in the next few weeks with a new installation guide.
But meanwhile, what version do you have?
(Give the command
pyomo --version
to a bash terminal.)
 Dave

--
You received this message because you are subscribed to the Google Groups "Pyomo Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyomo-forum...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lbertolotti

unread,
Jan 5, 2015, 9:31:01 AM1/5/15
to pyomo...@googlegroups.com, dlwoo...@ucdavis.edu
Coopr 3.4 (CPython 2.7.6 on Linux 3.13.0-43-generic)

lbertolotti

unread,
Jan 6, 2015, 3:09:41 PM1/6/15
to pyomo...@googlegroups.com, dlwoo...@ucdavis.edu
Has the new version been released?

William Hart

unread,
Jan 6, 2015, 4:21:24 PM1/6/15
to pyomo...@googlegroups.com
A beta release has been cut.  I expect the 4.0 release to be finalized by tomorrow.

--Bill

On Tue, Jan 6, 2015 at 1:09 PM, 'lbertolotti' via Pyomo Forum <pyomo...@googlegroups.com> wrote:
Has the new version been released?

--

lbertolotti

unread,
Jan 8, 2015, 3:07:31 PM1/8/15
to pyomo...@googlegroups.com
Can I download the new version?

Bill Hart

unread,
Jan 9, 2015, 1:59:32 PM1/9/15
to pyomo...@googlegroups.com
Yep.  Try it now!

lbertolotti

unread,
Jan 10, 2015, 6:40:26 AM1/10/15
to pyomo...@googlegroups.com
Where is it?

William Hart

unread,
Jan 10, 2015, 7:07:43 AM1/10/15
to pyomo...@googlegroups.com
It's available on PyPI.  See www.pyomo.org for download instructions.

--Bill

On Sat, Jan 10, 2015 at 4:40 AM, 'lbertolotti' via Pyomo Forum <pyomo...@googlegroups.com> wrote:
Where is it?

lbertolotti

unread,
Apr 19, 2015, 12:47:50 PM4/19/15
to pyomo...@googlegroups.com
I was using this book as a guide for Pyomo: http://www.springer.com/gp/book/9781461432258
Is the information there still valid?

from coopr.pyomo import *

is now giving me:

ImportError: No module named coopr.pyomo

David Woodruff

unread,
Apr 19, 2015, 12:49:50 PM4/19/15
to pyomo...@googlegroups.com
Use the installation instructions that can be found at pyomo.org

lbertolotti

unread,
Apr 19, 2015, 1:09:19 PM4/19/15
to pyomo...@googlegroups.com, dlwoo...@ucdavis.edu
Already did that:

lucas@lucas-K55VD:~$ pyomo --version

    Seems like you are using OpenOpt from
    commercial Enthought Python Distribution;
    consider using free GPL-licensed alternatives
    PythonXY (http://www.pythonxy.com) or
    Sage (http://sagemath.org) instead.
   
Pyomo 4.0.9682 (CPython 2.7.6 on Linux 3.13.0-49-generic)

Siirola, John D

unread,
Apr 19, 2015, 1:44:58 PM4/19/15
to pyomo...@googlegroups.com, dlwoo...@ucdavis.edu

Pyomo 4.0 is 99% compatible with the first edition of The Book.  One of the biggest differences is that the main namespace for pyomo has changed from coopr to pyomo.  So, you should get into the habit of replacing:

 

                from coopr.pyomo import *

 

with

 

                from pyomo.environ import *

 

You can also install the latest release of Coopr (that is, “pip install coopr”), which will install a compatibility layer that will allow the vast majority of existing models and scripts to still run.

 

john

--

Reply all
Reply to author
Forward
0 new messages