{"id":125668,"date":"2020-01-08T10:45:19","date_gmt":"2020-01-08T02:45:19","guid":{"rendered":"http:\/\/4563.org\/?p=125668"},"modified":"2020-01-08T10:45:19","modified_gmt":"2020-01-08T02:45:19","slug":"%e7%9c%8b%e6%9d%a5%e6%98%af%e6%97%b6%e5%80%99%e5%90%91-python2-%e5%91%8a%e5%88%ab%e4%ba%86","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=125668","title":{"rendered":"\u770b\u6765\u662f\u65f6\u5019\u5411 python2 \u544a\u522b\u4e86"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u770b\u6765\u662f\u65f6\u5019\u5411 python2 \u544a\u522b\u4e86               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ecloud <\/span>  <span><i><\/i> 64<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6700\u8fd1\u8981\u7528 astropy \u505a\u70b9\u4e1c\u897f\uff0c2.7 \u7528 pip \u88c5\u4e0a\u4ee5\u540e\u8fd8\u88c5\u4e86\u4e00\u5927\u5806\u989d\u5916\u7684\u5305\uff0c\u7136\u800c\u8fd8\u662f\u4e0d\u597d\u7528\u2026\u2026<\/p>\n<pre><code>AstroT4:~ zachary$ python test.py 'import sitecustomize' failed; use -v for traceback Traceback (most recent call last):   File \"test.py\", line 4, in &lt;module&gt;     from astropy import units as u   File \"\/usr\/local\/Cellar\/[email&#160;protected]\/2.7.17\/Frameworks\/Python.framework\/Versions\/2.7\/lib\/python2.7\/site-packages\/astropy\/__init__.py\", line 116, in &lt;module&gt;     _check_numpy()   File \"\/usr\/local\/Cellar\/[email&#160;protected]\/2.7.17\/Frameworks\/Python.framework\/Versions\/2.7\/lib\/python2.7\/site-packages\/astropy\/__init__.py\", line 110, in _check_numpy     raise ImportError(msg) ImportError: Numpy version 1.9.0 or later must be installed to use Astropy AstroT4:~ zachary$ pip show numpy 'import sitecustomize' failed; use -v for traceback DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https:\/\/pip.pypa.io\/en\/latest\/development\/release-process\/#python-2-support Name: numpy Version: 1.14.1 Summary: NumPy: array processing for numbers, strings, records, and objects. Home-page: http:\/\/www.numpy.org Author: NumPy Developers Author-email: [email&#160;protected] License: BSD Location: \/usr\/local\/lib\/python2.7\/site-packages Requires: Required-by: pyfits, matplotlib, astropy <\/code><\/pre>\n<p>\u7b80\u76f4\u4e0d\u53ef\u7406\u55bb\uff08\u6211\u4f30\u8ba1\u73b0\u5728\u5411\u4efb\u4f55\u4eba\u63d0\u5173\u4e8e 2.7 \u7684 bug \u90fd\u4e0d\u4f1a\u6709\u53cd\u9988\u7684\uff09<\/p>\n<p>\u7136\u540e\u6362 python3\uff0cpip \u53ea\u88c5\u4e86\u4e00\u4e2a astropy \u5305\uff0c\u8fd0\u884c\u8d77\u6765\u6ca1\u6709\u4efb\u4f55\u95ee\u9898      <\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>1<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"49875\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lihongjie0209 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5bf9\u4e8e\u4f60\u8fd9\u79cd\u7c7b\u578b\u7684\u7528\u6237\u6765\u8bf4\u662f\u53ef\u4ee5\u5347\u7ea7\u5230 python3<\/p>\n<p>\u4f46\u662f\u5bf9\u4e8e\u8fd0\u7ef4\u6765\u8bf4\uff0c \u7cfb\u7edf\u81ea\u5e26\u4ec0\u4e48\u7248\u672c\u5c31\u7528\u4ec0\u4e48\u7248\u672c\uff0cCentOS 7 \u5230\u73b0\u5728\u8fd8\u662f 2.7\uff0c \u53ea\u8981 CentOS 7 \u8fd8\u5728\u7ebf\u4e0a\u8dd1\uff0c \u6211\u4f30\u8ba1 2.7 \u8981\u4f1a\u7528\u4e0b\u53bb                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u770b\u6765\u662f\u65f6\u5019\u5411 python2 \u544a\u522b&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/125668"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=125668"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/125668\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=125668"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=125668"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=125668"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}