Install python-glpk












1















I want to install python-glpk
I followed the instructions here:
https://en.wikibooks.org/wiki/GLPK/Python



But when I tried to do this:



import glpk
print glpk.glp_version()


I have these errors



enter image description here



Thank you










share|improve this question









New contributor




Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • It is known bug in Ubuntu 16.04 LTS, see fix in my answer below.

    – N0rbert
    4 hours ago
















1















I want to install python-glpk
I followed the instructions here:
https://en.wikibooks.org/wiki/GLPK/Python



But when I tried to do this:



import glpk
print glpk.glp_version()


I have these errors



enter image description here



Thank you










share|improve this question









New contributor




Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • It is known bug in Ubuntu 16.04 LTS, see fix in my answer below.

    – N0rbert
    4 hours ago














1












1








1


1






I want to install python-glpk
I followed the instructions here:
https://en.wikibooks.org/wiki/GLPK/Python



But when I tried to do this:



import glpk
print glpk.glp_version()


I have these errors



enter image description here



Thank you










share|improve this question









New contributor




Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I want to install python-glpk
I followed the instructions here:
https://en.wikibooks.org/wiki/GLPK/Python



But when I tried to do this:



import glpk
print glpk.glp_version()


I have these errors



enter image description here



Thank you







software-installation






share|improve this question









New contributor




Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 5 hours ago









N0rbert

22k547104




22k547104






New contributor




Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 6 hours ago









Cult 24Cult 24

61




61




New contributor




Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Cult 24 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • It is known bug in Ubuntu 16.04 LTS, see fix in my answer below.

    – N0rbert
    4 hours ago



















  • It is known bug in Ubuntu 16.04 LTS, see fix in my answer below.

    – N0rbert
    4 hours ago

















It is known bug in Ubuntu 16.04 LTS, see fix in my answer below.

– N0rbert
4 hours ago





It is known bug in Ubuntu 16.04 LTS, see fix in my answer below.

– N0rbert
4 hours ago










1 Answer
1






active

oldest

votes


















0














Bug



For Ubuntu 16.04 LTS it is known issue - it was reported to LaunchPad.net on 2016-10-02 as bug 1629672.



Fix



We can fix this bug by installation of previous version of python-ply component with pip into your home folder:



sudo apt-get install python-pip
pip install ply==3.4 --user


And then test it with simple script (name it glpk_test.py) with contents:



#!/usr/bin/python2
import glpk
print glpk.glp_version()


then make it executable with chmod +x glpk_test.py and execute with ./glpk_test.py.



The output on Ubuntu 16.04 LTS will be:




4.57






share|improve this answer


























  • Hi, Thanks for the quick response I did it, but nothing happend. The steps that I followed to install are: 1) sudo apt-get install python-glpk 2) sudo apt-get install glpk-utils 3) sudo apt-get install python-pip 4) pip install ply==3.4 --user Am I right?

    – Cult 24
    3 hours ago













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






Cult 24 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111753%2finstall-python-glpk%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Bug



For Ubuntu 16.04 LTS it is known issue - it was reported to LaunchPad.net on 2016-10-02 as bug 1629672.



Fix



We can fix this bug by installation of previous version of python-ply component with pip into your home folder:



sudo apt-get install python-pip
pip install ply==3.4 --user


And then test it with simple script (name it glpk_test.py) with contents:



#!/usr/bin/python2
import glpk
print glpk.glp_version()


then make it executable with chmod +x glpk_test.py and execute with ./glpk_test.py.



The output on Ubuntu 16.04 LTS will be:




4.57






share|improve this answer


























  • Hi, Thanks for the quick response I did it, but nothing happend. The steps that I followed to install are: 1) sudo apt-get install python-glpk 2) sudo apt-get install glpk-utils 3) sudo apt-get install python-pip 4) pip install ply==3.4 --user Am I right?

    – Cult 24
    3 hours ago


















0














Bug



For Ubuntu 16.04 LTS it is known issue - it was reported to LaunchPad.net on 2016-10-02 as bug 1629672.



Fix



We can fix this bug by installation of previous version of python-ply component with pip into your home folder:



sudo apt-get install python-pip
pip install ply==3.4 --user


And then test it with simple script (name it glpk_test.py) with contents:



#!/usr/bin/python2
import glpk
print glpk.glp_version()


then make it executable with chmod +x glpk_test.py and execute with ./glpk_test.py.



The output on Ubuntu 16.04 LTS will be:




4.57






share|improve this answer


























  • Hi, Thanks for the quick response I did it, but nothing happend. The steps that I followed to install are: 1) sudo apt-get install python-glpk 2) sudo apt-get install glpk-utils 3) sudo apt-get install python-pip 4) pip install ply==3.4 --user Am I right?

    – Cult 24
    3 hours ago
















0












0








0







Bug



For Ubuntu 16.04 LTS it is known issue - it was reported to LaunchPad.net on 2016-10-02 as bug 1629672.



Fix



We can fix this bug by installation of previous version of python-ply component with pip into your home folder:



sudo apt-get install python-pip
pip install ply==3.4 --user


And then test it with simple script (name it glpk_test.py) with contents:



#!/usr/bin/python2
import glpk
print glpk.glp_version()


then make it executable with chmod +x glpk_test.py and execute with ./glpk_test.py.



The output on Ubuntu 16.04 LTS will be:




4.57






share|improve this answer















Bug



For Ubuntu 16.04 LTS it is known issue - it was reported to LaunchPad.net on 2016-10-02 as bug 1629672.



Fix



We can fix this bug by installation of previous version of python-ply component with pip into your home folder:



sudo apt-get install python-pip
pip install ply==3.4 --user


And then test it with simple script (name it glpk_test.py) with contents:



#!/usr/bin/python2
import glpk
print glpk.glp_version()


then make it executable with chmod +x glpk_test.py and execute with ./glpk_test.py.



The output on Ubuntu 16.04 LTS will be:




4.57







share|improve this answer














share|improve this answer



share|improve this answer








edited 4 hours ago

























answered 5 hours ago









N0rbertN0rbert

22k547104




22k547104













  • Hi, Thanks for the quick response I did it, but nothing happend. The steps that I followed to install are: 1) sudo apt-get install python-glpk 2) sudo apt-get install glpk-utils 3) sudo apt-get install python-pip 4) pip install ply==3.4 --user Am I right?

    – Cult 24
    3 hours ago





















  • Hi, Thanks for the quick response I did it, but nothing happend. The steps that I followed to install are: 1) sudo apt-get install python-glpk 2) sudo apt-get install glpk-utils 3) sudo apt-get install python-pip 4) pip install ply==3.4 --user Am I right?

    – Cult 24
    3 hours ago



















Hi, Thanks for the quick response I did it, but nothing happend. The steps that I followed to install are: 1) sudo apt-get install python-glpk 2) sudo apt-get install glpk-utils 3) sudo apt-get install python-pip 4) pip install ply==3.4 --user Am I right?

– Cult 24
3 hours ago







Hi, Thanks for the quick response I did it, but nothing happend. The steps that I followed to install are: 1) sudo apt-get install python-glpk 2) sudo apt-get install glpk-utils 3) sudo apt-get install python-pip 4) pip install ply==3.4 --user Am I right?

– Cult 24
3 hours ago












Cult 24 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















Cult 24 is a new contributor. Be nice, and check out our Code of Conduct.













Cult 24 is a new contributor. Be nice, and check out our Code of Conduct.












Cult 24 is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111753%2finstall-python-glpk%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

香粉寮

GameSpot