{"id":3340,"date":"2020-06-16T15:08:20","date_gmt":"2020-06-16T07:08:20","guid":{"rendered":"http:\/\/www.chenlianfu.com\/?p=3340"},"modified":"2022-09-20T12:04:06","modified_gmt":"2022-09-20T04:04:06","slug":"%e5%ae%89%e8%a3%85smcpp%e8%bd%af%e4%bb%b6","status":"publish","type":"post","link":"http:\/\/www.chenlianfu.com\/?p=3340","title":{"rendered":"\u5b89\u88c5smcpp\u8f6f\u4ef6"},"content":{"rendered":"\n<p>\u5728CentOS8\u7cfb\u7edf\u76f4\u63a5\u5b89\u88c5smcpp\u8f6f\u4ef6<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dnf install mpfr mpfr-devel gmp gmp-devel gsl gsl-devel\r\npip3 uninstall numpy pandas\npip3 install numpy==1.19\npip3 install pandas==1.4\r\npip3 install git+https:\/\/github.com\/popgenmethods\/smcpp\r<\/code><\/pre>\n\n\n\n<p>\u4e5f\u53ef\u4ee5\u4f7f\u7528Conda\u5b89\u88c5smcpp\u8f6f\u4ef6\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4e0b\u8f7d\u6700\u65b0\u7248\u672c\u7684miniconda\u5e76\u5b89\u88c5\nwget https:\/\/repo.continuum.io\/miniconda\/Miniconda3-latest-Linux-x86_64.sh\nsh https:\/\/repo.continuum.io\/miniconda\/Miniconda3-latest-Linux-x86_64.sh\n# \u5c06\u8f6f\u4ef6\u5b89\u88c5\u5230\u6307\u5b9a\u76ee\u5f55\/opt\/biosoft\/miniconda3_for_smcpp\uff0c\u5e76\u8bbe\u7f6e\u4e0d\u8981\u4fee\u6539~\/.bashrc\n\n# \u8f7d\u5165conda\u73af\u5883\uff0c\u66f4\u65b0conda\uff0c\u5b89\u88c5smcpp\u8f6f\u4ef6\nexport PATH=\/opt\/biosoft\/miniconda3_for_smcpp\/bin\/:$PATH\nconda update conda\nconda create -n smcpp -c conda-forge -c terhorst smcpp\n\n# \u4f7f\u7528smcpp\u8f6f\u4ef6\u65b9\u6cd5\uff0c\u9700\u8981\u5148\u8f7d\u5165conda\u73af\u5883\uff0c\u518d\u6fc0\u6d3bsmcpp\u8f6f\u4ef6\u73af\u5883\nexport PATH=\/opt\/biosoft\/miniconda3_for_smcpp\/bin\/:$PATH\nsource activate \/opt\/biosoft\/miniconda3_for_smcpp\nconda activate smcpp\n\n# \u4f7f\u7528smcpp\u8f6f\u4ef6\u547d\u4ee4\nsmc++\n\n# \u62a5\u9519\u7f3a\u5c11libbz2\u5e93\u6587\u4ef6\uff0c\u5b89\u88c5bzip2\u8f6f\u4ef6\nconda install -c conda-forge bzip2\n\n# \u62a5\u9519\nfrom pysam.libchtslib import * ImportError: \/lib64\/libm.so.6: version `GLIBC_2.29' not found\uff0c\u4e0e\u5f53\u524dgcc\u4e0d\u517c\u5bb9\u3002\u4f7f\u7528\u5f53\u524d\u7248\u672cgcc\u91cd\u65b0\u7f16\u8bd1python\u7684pysam\u6a21\u5757\u3002\nrm -rf \/opt\/biosoft\/miniconda3_for_smcpp\/envs\/smcpp\/lib\/python3.7\/site-packages\/pysam* \ncd \/opt\/biosoft\/miniconda3_for_smcpp\/\nwget https:\/\/files.pythonhosted.org\/packages\/18\/74\/69018650a6ec9dae2eb2f710e158fa395134ce579c605f152e41890e7f3c\/pysam-0.16.0.tar.gz\ntar zxf pysam-0.16.0.tar.gz \ncd pysam-0.16.0\/\npython setup.py install<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5728CentOS8\u7cfb\u7edf\u76f4\u63a5\u5b89\u88c5smcpp\u8f6f\u4ef6 \u4e5f\u53ef\u4ee5\u4f7f\u7528Conda\u5b89\u88c5smcpp\u8f6f &hellip; <a href=\"http:\/\/www.chenlianfu.com\/?p=3340\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/3340"}],"collection":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3340"}],"version-history":[{"count":4,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/3340\/revisions"}],"predecessor-version":[{"id":3703,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=\/wp\/v2\/posts\/3340\/revisions\/3703"}],"wp:attachment":[{"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3340"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.chenlianfu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}