{"id":88,"date":"2013-08-03T02:55:16","date_gmt":"2013-08-03T00:55:16","guid":{"rendered":"http:\/\/andreikucharavy.com\/L3Cache\/?p=88"},"modified":"2014-03-16T23:47:00","modified_gmt":"2014-03-16T22:47:00","slug":"installing-scikit-sparse-on-centos-or-fedora","status":"publish","type":"post","link":"https:\/\/andreikucharavy.com\/L3Cache\/installing-scikit-sparse-on-centos-or-fedora\/","title":{"rendered":"Installing scikit.sparse on CentOS or Fedora"},"content":{"rendered":"<p><strong>Step 1:\u00a0<\/strong>install the METIS library:<\/p>\n<p>1 ) Install cmake as described here:<\/p>\n<p><a href=\"http:\/\/pkgs.org\/centos-6-rhel-6\/atrpms-testing-x86_64\/cmake-2.8.4-1.el6.x86_64.rpm.html\">http:\/\/pkgs.org\/centos-6-rhel-6\/atrpms-testing-x86_64\/cmake-2.8.4-1.el6.x86_64.rpm.html<\/a>,<\/p>\n<p>For the lazy:<\/p>\n<p>&#8211; Dowload the latest atrpms-repo rpm from<\/p>\n<pre>http:\/\/dl.atrpms.net\/el6-x86_64\/atrpms\/stable\/<\/pre>\n<p>&#8211; Install atrpms-repo rpm as an admin:<\/p>\n<pre># sudo rpm -Uvh atrpms-repo*rpm<\/pre>\n<p>&#8211; Install cmake rpm package:<\/p>\n<pre># yum --enablerepo=atrpms-testing install cmake<\/pre>\n<p>2) Install either the GNU make with<\/p>\n<pre># yum install make<\/pre>\n<p>or the whole Development tools with<\/p>\n<pre># yum groupinstall \"Development Tools\"<\/pre>\n<p>3) Download METIS from\u00a0<a title=\"METIS \" href=\"http:\/\/glaros.dtc.umn.edu\/gkhome\/metis\/metis\/download\">http:\/\/glaros.dtc.umn.edu\/gkhome\/metis\/metis\/download<\/a>\u00a0and follow the instructions in the &#8220;install.txt&#8221; to actually install it:<\/p>\n<p>&#8211; adjust the include.metix.h to adjust the length of ints and floats to better correspond to your architecture and wanted precision (32 or 64 bits)<\/p>\n<p>-execute:<\/p>\n<pre>$ make config \r\n$ make \r\n# make install<\/pre>\n<p><strong>Step 2:<\/strong> Install SuiteSparse:<\/p>\n<p>1) Download the latest version from\u00a0<a href=\"http:\/\/www.cise.ufl.edu\/research\/sparse\/SuiteSparse\/\">http:\/\/www.cise.ufl.edu\/research\/sparse\/SuiteSparse\/<\/a>,\u00a0untar it and\u00a0cd into it<\/p>\n<p>2) Modify the SuiteSparse_config.SuiteSparse_config.mk INSTALL_INCLUDE variable :<\/p>\n<pre>INSTALL_INCLUDE = \/usr\/local\/include<\/pre>\n<p>3) Build and install it<\/p>\n<pre>$ make \r\n# make install<\/pre>\n<p><strong>Step 3:<\/strong> Install the scikit.sparse:<\/p>\n<p>1) Download the latest scikit.sparse from PiPy:<\/p>\n<p>2) in setup.py edit the last statement so that it looks like this:<\/p>\n<div class=\"line\" style=\"padding-left: 10px;\">\n<pre>Extension(\"scikits.sparse.cholmod\",\r\n         [\"scikits\/sparse\/cholmod.pyx\"],\r\n         libraries=[\"cholmod\"],\r\n         include_dirs=[np.get_include()].append(\"\/usr\/local\/include\"),\r\n         library_dirs=[\"\/usr\/local\/lib\"],\r\n),<\/pre>\n<\/div>\n<p><strong>Step 4:<\/strong><\/p>\n<p>Well, the scikit.sparse imports well at this point, but if we try to import scikits.sparse.cholmod, we have an Import error, where our egg\/scikits\/sparse\/cholmod.so fails to recognize the amd_printf symbol&#8230;.<\/p>\n<p>Hmmm. Looks like there is still work to be done to get it all working correctly&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1:\u00a0install the METIS library: 1 ) Install cmake as described here: http:\/\/pkgs.org\/centos-6-rhel-6\/atrpms-testing-x86_64\/cmake-2.8.4-1.el6.x86_64.rpm.html, For the lazy: &#8211; Dowload the latest atrpms-repo rpm from http:\/\/dl.atrpms.net\/el6-x86_64\/atrpms\/stable\/ &#8211; Install atrpms-repo rpm as an admin: # sudo rpm -Uvh atrpms-repo*rpm &#8211; Install cmake rpm package: # yum &#8211;enablerepo=atrpms-testing install cmake 2) Install either the GNU make with # yum <a class=\"read-more\" href=\"https:\/\/andreikucharavy.com\/L3Cache\/installing-scikit-sparse-on-centos-or-fedora\/\">[&hellip;]<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[21,20,9,19],"class_list":["post-88","post","type-post","status-publish","format-standard","hentry","category-prog","tag-graph","tag-matrix","tag-programming","tag-python"],"_links":{"self":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts\/88"}],"collection":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/comments?post=88"}],"version-history":[{"count":4,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts\/88\/revisions"}],"predecessor-version":[{"id":101,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/posts\/88\/revisions\/101"}],"wp:attachment":[{"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/media?parent=88"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/categories?post=88"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andreikucharavy.com\/L3Cache\/wp-json\/wp\/v2\/tags?post=88"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}