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

分享到:

91 条评论

昵称
  1. minecraft games

    What’s up everybody, here every one is sharing these experience, therefore
    it’s nice to read this web site, and I used to pay a visit this
    website every day.

  2. quest bars cheap

    Link exchange is nothing else except it is only placing the other person’s blog
    link on your page at suitable place and other person will also do same in support of you.

  3. quest bars cheap

    Hi! Someone in my Facebook group shared this site with us
    so I came to look it over. I’m definitely loving the
    information. I’m book-marking and will be tweeting this to my followers!
    Terrific blog and amazing style and design.

  4. quest bars cheap

    Thanks for finally writing about >Centos7安装python3注意事项 – Matt的学习空间 <Liked it!

  5. descargar facebook

    Terrific article! That is the kind of info that should be shared across the web.
    Disgrace on the search engines for now not positioning this post higher!
    Come on over and seek advice from my site . Thanks =)

  6. descargar facebook

    Simply want to say your article is as astounding.
    The clearness in your publish is simply nice and that i could suppose
    you are an expert in this subject. Fine along with your permission allow me to grasp your RSS feed to
    keep updated with drawing close post. Thanks one million and please continue the
    gratifying work.

  7. descargar facebook

    Hi there i am kavin, its my first time to commenting
    anyplace, when i read this paragraph i thought i could also
    make comment due to this good paragraph.

  8. plenty of fish dating site

    Just desire to say your article is as astounding.
    The clarity for your submit is simply great and i could assume you’re an expert in this subject.
    Well together with your permission allow me to seize your feed to keep updated with coming near
    near post. Thanks one million and please carry on the gratifying work.

  9. plenty of fish dating site

    You’ve made some good points there. I looked on the internet to
    find out more about the issue and found most people will go along with your views on this web site.

  10. Greetings I am so thrilled I found your web site, I really found you by accident,
    while I was looking on Yahoo for something else, Regardless I am here now and
    would just like to say thanks for a incredible post and a
    all round enjoyable blog (I also love the theme/design), I don’t have time to read it all at the moment but
    I have saved it and also added in your RSS feeds, so when I have time I
    will be back to read a great deal more, Please do keep
    up the awesome work. natalielise plenty of fish

  11. plenty of fish

    Good answers in return of this question with firm arguments
    and telling all regarding that.

  12. It is the best time to make some plans for the future and it’s time to be
    happy. I’ve read this post and if I could I want to suggest you
    some interesting things or suggestions. Perhaps you can write next articles referring to this article.
    I want to read even more things about it! natalielise plenty of fish

  13. pof

    Do you have any video of that? I’d like to find out some additional information.

  14. plenty of fish

    I was suggested this website by my cousin. I’m not sure whether
    this post is written by him as nobody else know such detailed about my trouble.
    You are wonderful! Thanks!

  15. plenty of fish

    Attractive element of content. I just stumbled
    upon your site and in accession capital to claim that I acquire in fact loved account your weblog posts.
    Any way I’ll be subscribing for your augment or even I achievement you access persistently rapidly.

  16. plenty of fish dating site

    I am regular reader, how are you everybody? This paragraph
    posted at this site is really pleasant.

  17. natalielise

    Hello there! This post could not be written any better! Reading this post reminds me of my old room mate!

    He always kept talking about this. I will forward this article to him.

    Pretty sure he will have a good read. Thank you for sharing!
    plenty of fish natalielise

  18. plenty of fish dating site

    It is perfect time to make a few plans for the long run and it’s time to be happy.
    I’ve read this put up and if I may I want to counsel you some fascinating things or tips.
    Perhaps you can write subsequent articles regarding this
    article. I desire to learn more issues about it!

  19. plenty of fish dating site

    I believe this is among the most vital information for me.

    And i’m satisfied studying your article. But want to statement on some
    common issues, The site taste is wonderful, the articles is in reality nice : D.

    Good process, cheers

  20. plenty of fish dating site

    First off I want to say superb blog! I had a quick question in which I’d
    like to ask if you do not mind. I was interested to find out
    how you center yourself and clear your mind
    before writing. I’ve had trouble clearing my thoughts in getting my ideas out.
    I do enjoy writing but it just seems like the first 10 to 15 minutes are usually wasted simply just trying to figure out how to
    begin. Any ideas or tips? Thank you!

  21. I don’t even understand how I finished up here, however I believed this publish used to be good.
    I do not know who you might be however definitely you’re
    going to a well-known blogger in the event you are not already.
    Cheers!

  22. Hey there would you mind stating which blog platform you’re using?
    I’m planning to start my own blog soon but I’m having a
    difficult time selecting between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs and I’m looking for something unique.

    P.S Sorry for getting off-topic but I had to ask!

  23. plenty of fish dating site

    Hey would you mind sharing which blog platform you’re using?

    I’m looking to start my own blog soon but I’m having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design seems different then most blogs and I’m looking for something completely unique.
    P.S Sorry for being off-topic but I had to ask!

  24. plenty of fish dating site

    I was curious if you ever considered changing the page
    layout of your blog? Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so people could
    connect with it better. Youve got an awful lot of text for only having 1 or two images.

    Maybe you could space it out better?

  25. plenty of fish dating site

    Stunning quest there. What happened after?
    Good luck!

  26. Hello, I think your blog might be having browser compatibility issues.
    When I look at your blog in Ie, it looks fine but when opening
    in Internet Explorer, it has some overlapping.
    I just wanted to give you a quick heads up! Other then that, terrific
    blog!

  27. Howdy! I’m at work browsing your blog from my new apple iphone!
    Just wanted to say I love reading your blog and look
    forward to all your posts! Carry on the superb work!

  28. Pretty great post. I just stumbled upon your blog and
    wanted to mention that I’ve really loved surfing around
    your blog posts. In any case I will be subscribing in your rss feed and
    I hope you write again very soon!

  29. plenty of fish dating site

    I was wondering if you ever considered changing the layout
    of your website? Its very well written; I love what youve got to say.
    But maybe you could a little more in the way of content so people could
    connect with it better. Youve got an awful lot of text for only having one or 2 images.
    Maybe you could space it out better?

  30. quest bars cheap

    Great work! That is the type of information that are supposed
    to be shared around the web. Shame on the search engines for no longer
    positioning this submit higher! Come on over and visit my site .
    Thanks =)