Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phase processing in python3 #389

Closed
swnesbitt opened this issue Oct 1, 2015 · 13 comments
Closed

Phase processing in python3 #389

swnesbitt opened this issue Oct 1, 2015 · 13 comments

Comments

@swnesbitt
Copy link
Collaborator

I have been slowly upgrading to python 3 and ran into snag central doing phase processing with PyART. AFAIK, cylp is not compatible with python 3, and neither is PyGLPK (last updated last decade). I am currently dealing with the pain of installing CVXOPT on OS X (BLAS/LAPACK) using homebrew. It would be really nice if cylp could be upgraded to python 3 (and support more recent versions of cbc). Any other packages on the horizon now that could allow for simpler installation and python3 compatibility?

@jjhelmus
Copy link
Contributor

jjhelmus commented Oct 1, 2015

Agree completely @swnesbitt . The lack of a Python 3 compatible LP library is what is holding me back from changing my default Python environment to Python 3. I do not want to change until all of Py-ART unit tests run in Python 3.4 and none are skipped. The CyLP folks do have an open issue coin-or/CyLP#15 on Python 3.4 support.

The ecyglpk package might be worth a look for a more modern Python interface to GLPK. Not sure if it supports Python 3.

@scollis
Copy link
Member

scollis commented Oct 1, 2015

If anyone wants to put some work into this it would have a great impact
on Py-ART! We need a better option for LP

On 10/1/15 10:09 AM, Jonathan J. Helmus wrote:

Agree completely @swnesbitt https://github.com/swnesbitt . The lack
of a Python 3 compatible LP library is what is holding me back from
changing my default Python environment to Python 3. I do not want to
change until all of Py-ART unit tests run in Python 3.4 and none are
skipped. The CyLP folks do have an open issue coin-or/CyLP#15
coin-or/CyLP#15 on Python 3.4 support.

The ecyglpk package https://github.com/equaeghe/ecyglpki might be
worth a look for a more modern Python interface to GLPK. Not sure if
it supports Python 3.


Reply to this email directly or view it on GitHub
#389 (comment).

@jjhelmus
Copy link
Contributor

jjhelmus commented Oct 1, 2015

I was able port enough of CyLP to Python 3 to allow the unit tests in CyLP and Py-ART to pass. I'm not going to provide link to the branches since they are a mess and need to be cleaned up before submitting and PR to CyLP.

What is the issue with CyLP not support recent version of Cbc, @swnesbitt? I am still using 2.8.8 and have not tried the 2.9.x release.

@swnesbitt
Copy link
Collaborator Author

I thought I had a build issue with 2.8.5 on OS X 10.11, but will try 2.8.8

On Oct 1, 2015, at 4:59 PM, Jonathan J. Helmus [email protected] wrote:

I was able port enough of CyLP to Python 3 to allow the unit tests in CyLP and Py-ART to pass. I'm not going to provide link to the branches since they are a mess and need to be cleaned up before submitting and PR to CyLP.

What is the issue with CyLP not support recent version of Cbc, @swnesbitt https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_swnesbitt&d=AwMCaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=oh_IyBh3p6AhkrNBZyzmmDfeXg2WKrzfthPLOoHreWM&m=A4dQIuaWhVrxj6wsia1S5_o0CzbBkXn6Szg_BIfYICM&s=w2v5y33IGj2nCgr5-0vLMQUn3Z7u1sMAb6oSFumk06E&e=? I am still using 2.8.8 and have not tried the 2.9.x release.


Reply to this email directly or view it on GitHub https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_ARM-2DDOE_pyart_issues_389-23issuecomment-2D144861775&d=AwMCaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=oh_IyBh3p6AhkrNBZyzmmDfeXg2WKrzfthPLOoHreWM&m=A4dQIuaWhVrxj6wsia1S5_o0CzbBkXn6Szg_BIfYICM&s=K_0P-A5Y0qEmRlgEj_oLiy77_YkmemfvHIMXZqphMUA&e=.

@jjhelmus
Copy link
Contributor

jjhelmus commented Oct 2, 2015

Pull request submitted to CyLP to add support for Python 3 coin-or/CyLP#28. Minor modification are needed for Py-ART's phase processing to work with CyLP in Python 3. Changes submitted as #392.

I've been testing with CBC 2.8.8 without issue. I have a conda package for the library build for OS X and Linux 64.

@jjhelmus
Copy link
Contributor

I found a fork of pyglpk which supports newer versions of the GLPK library and in the v0.4-dev branch supports Python 3! Using this and CyLP with my PR applied I was able to get all the Py-ART unit tests to pass in Python 3.5 on my Linux machine. I believe the same should be possible on OS X.

The tests emit a few warnings including #478 which I want to clean up. I'll work on creating conda packages of the various phase processing modules to make this more robust and reproducible.

@scollis
Copy link
Member

scollis commented Mar 16, 2016

Fantastic!

Jonathan J. Helmus wrote:

I found a fork of pyglpk https://github.com/bradfordboyle/pyglpk
which supports newer versions of the GLPK library and in the v0.4-dev
branch supports Python 3! Using this and CyLP with my PR applied I was
able to get all the Py-ART unit tests to pass in Python 3.5 on my
Linux machine. I believe the same should be possible on OS X.

The tests emit a few warnings including #478
#478 which I want to clean
up. I'll work on creating conda packages of the various phase
processing modules to make this more robust and reproducible.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#389 (comment)

@hhuangwx
Copy link

@jjhelmus Would you please make a pyglpk/cylp package which could be easily installed on OSX and linux for python 3 on anaconda cloud? That'll help a lot for us to move to python3. Thank you!

@hhuangwx
Copy link

I found cvxopt/cvxopt_glpk packages https://anaconda.org/omnia/cvxopt and https://anaconda.org/mlgill/cvxopt_glpk which seem working well in my OSX. The accuracy of the results is still under test. By the way, linprog has been added to scipy since 0.15, which would benefit the portability of pyart.

@scollis
Copy link
Member

scollis commented Apr 12, 2016

Very interesting! Will definitely need to check out linprog

Dr Scott Collis
Purveyor of lofty observations (Atmospheric Scientist)
Environmental Science Division
Argonne National Laboratory
Mb: +1 630 235 8025
Of: +1 630 252 0550
Become a Py-ART user today! http://arm-doe.github.io/pyart/ http://arm-doe.github.io/pyart/

On Apr 12, 2016, at 9:43 AM, Hao Huang [email protected] wrote:

I found cvxopt/cvxopt_glpk packages https://anaconda.org/omnia/cvxopt/https://anaconda.org/mlgill/cvxopt_glpk https://anaconda.org/omnia/cvxopt/https://anaconda.org/mlgill/cvxopt_glpk which seem working well in my OSX. The accuracy of the results is still under test. By the way, linprog has been added to scipy since 0.15, which would benefit the portability of pyart.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub #389 (comment)

@jjhelmus
Copy link
Contributor

Would you please make a pyglpk/cylp package which could be easily installed on OSX and linux for python 3 on anaconda cloud?

I'm been working on this but creating portable packages for pyglpk, cylp and cvxopt with glpk support is turning out to be more of a challenge that I had expected. Part of this is that there is not releases of cylp and PyGLPK which supports Python 3 so I need to build against a fork. The other difficulty is that cvxopt and cylp both require linking to BLAS/LAPACK which is a bit difficult to do in conda in a portable manner. I'll keep working on these but it may take a bit.

@scollis
Copy link
Member

scollis commented Jul 13, 2017

So @jjhelmus 's PR is still languishing over at CyLP
coin-or/CyLP#28

I stumbled on this:
https://github.com/coin-or/pulp
I wonder if it will help us.

@zssherman
Copy link
Collaborator

The python 3 branch was merged into CyLP master, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants