Centos7安装python3注意事项

make install必备的包:yum install libffi-devel -y 如没有安装会报:

ModuleNotFoundError: No module named ‘_ctypes’

安装完之后执行python依旧是2.x的版本,需要使用python3的格式来运行。可以建立一个软连接把python3映射到python命令来

mv /usr/bin/python /usr/bin/python.bak  #把之前的备份

ln -s /usr/python/bin/python3 /usr/bin/python

由于yum默认是2.x的python,所以我们要把python头换成python2

vim  /usr/bin/yum

把 #! /usr/bin/python修改为  #! /usr/bin/python2

同理 vim  /usr/libexec/urlgrabber-ext-down

Tip:pip官方源通常会出现无法下载的问题。通过修改国内源可以解决这个问题:

pip install xlrd -i http://pypi.douban.com/simple –trusted-host pypi.douban.com

下面是常用的国内源地址:

1)http://mirrors.aliyun.com/pypi/simple/ 阿里云

2)https://pypi.mirrors.ustc.edu.cn/simple/  中国科技大学

3) http://pypi.douban.com/simple/  豆瓣

4) https://pypi.tuna.tsinghua.edu.cn/simple/ 清华大学

5)  http://pypi.mirrors.ustc.edu.cn/simple/ 中国科学技术大学

enjoy it

分享到:

138 条评论

昵称
  1. Just wanna comment on few general things, The website design and style is perfect, the articles is real great. “War is much too serious a matter to be entrusted to the military.” by Georges Clemenceau.

  2. This is a topic close to my heart cheers, where are your contact details though?

  3. I’m truly enjoying the design and layout of your website. It’s a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a developer to create your theme? Great work!

  4. You are my inhalation, I possess few web logs and sometimes run out from to brand : (.

  5. Excellent goods from you, man. I’ve understand your stuff previous to and you are just extremely great. I actually like what you’ve acquired here, certainly like what you are saying and the way in which you say it. You make it entertaining and you still care for to keep it wise. I cant wait to read far more from you. This is really a terrific web site.

  6. I truly wanted to write down a message to be able to say thanks to you for those fantastic guidelines you are posting on this website. My rather long internet search has at the end been rewarded with awesome insight to go over with my co-workers. I would believe that many of us site visitors are really fortunate to live in a notable place with very many outstanding professionals with useful advice. I feel truly blessed to have used your entire website page and look forward to so many more amazing moments reading here. Thanks a lot again for a lot of things.

  7. Rattling excellent information can be found on weblog. “Politics is applesauce.” by Will Rogers.

  8. in Deutschland

    Good blog! I truly love how it is simple on my eyes and the data are well written. I’m wondering how I might be notified whenever a new post has been made. I’ve subscribed to your RSS which must do the trick! Have a nice day!

  9. I precisely wished to thank you very much once more. I am not sure the things I could possibly have undertaken without the actual creative ideas shown by you over this concern. It had been a real intimidating situation for me personally, but viewing the well-written manner you solved that made me to weep for contentment. Now i’m happier for this assistance and believe you really know what an amazing job you are getting into instructing the mediocre ones with the aid of your webblog. Most likely you have never come across any of us.

  10. Its such as you learn my mind! You seem to understand a lot approximately this, like you wrote the e-book in it or something. I think that you simply could do with a few p.c. to pressure the message home a little bit, however other than that, that is fantastic blog. An excellent read. I’ll definitely be back.

  11. I happen to be commenting to make you know what a brilliant discovery my friend’s child went through visiting your blog. She even learned a good number of things, which included what it’s like to possess an excellent teaching nature to make a number of people without difficulty know chosen hard to do subject matter. You truly did more than readers’ expected results. I appreciate you for imparting such interesting, trusted, explanatory and in addition cool thoughts on that topic to Ethel.

  12. I as well as my buddies were actually looking through the great recommendations found on your website and so then came up with a terrible feeling I never thanked the web blog owner for those secrets. Most of the men appeared to be for that reason very interested to study all of them and already have in truth been loving those things. I appreciate you for getting well accommodating as well as for utilizing these kinds of incredibly good topics most people are really desperate to know about. Our own honest apologies for not saying thanks to earlier.

  13. I wish to show appreciation to the writer for bailing me out of such a predicament. After surfing around throughout the search engines and coming across basics which were not pleasant, I was thinking my life was gone. Existing without the strategies to the issues you’ve fixed by way of the review is a serious case, and ones that might have adversely damaged my entire career if I hadn’t come across your web page. Your personal knowledge and kindness in maneuvering all things was useful. I’m not sure what I would’ve done if I had not come across such a step like this. I can also now look ahead to my future. Thanks so much for this high quality and amazing guide. I won’t think twice to suggest your blog to anyone who should have guidance on this subject.

  14. I simply wanted to thank you very much again. I do not know what I would have gone through without the type of pointers contributed by you over that area of interest. It previously was an absolute fearsome difficulty in my position, but considering a specialized tactic you resolved it took me to weep over happiness. I am just thankful for this service and as well , believe you really know what a powerful job you happen to be carrying out educating the rest by way of your websites. I am sure you’ve never come across all of us.

  15. My husband and i were so thrilled Ervin managed to complete his reports because of the precious recommendations he came across from your very own blog. It is now and again perplexing to simply choose to be offering tips which often a number of people may have been trying to sell. Therefore we remember we have you to be grateful to for that. The main explanations you have made, the straightforward website navigation, the relationships you will give support to engender – it’s many wonderful, and it’s helping our son and us feel that that article is awesome, and that is truly serious. Many thanks for everything!

  16. I in addition to my friends were studying the excellent tactics on your web page then before long came up with a horrible suspicion I had not thanked the website owner for those techniques. These young boys became certainly very interested to learn them and already have clearly been using them. Many thanks for indeed being really kind as well as for figuring out varieties of marvelous tips most people are really eager to discover. My very own sincere apologies for not expressing appreciation to you earlier.

  17. try this site

    You actually make it seem so easy with your presentation but I find this topic to be actually something that I believe I’d by no means understand. It kind of feels too complicated and extremely vast for me. I am taking a look forward in your next submit, I will attempt to get the hold of it!

  18. this link

    Hello! I could have sworn I’ve been to this blog before but after browsing through some of the post I realized it’s new to me. Anyways, I’m definitely happy I found it and I’ll be book-marking and checking back frequently!