zoukankan      html  css  js  c++  java
  • Python3.3.3 安装(Linux系统)

    1.wget http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz

    //检查http://www.python.org/ftp/python网址上有什么版本,再选择自己需要下载的版本

    2.tar -xzvf Python-3.3.3.tgz

    //由于是.tgz后缀的文件,参数选择是-xzvf,若是其他格式的压缩文件,参数会有不同

    3.sudo mkdir /usr/local/python3

    //创建自己想要的安装目录

    4.执行:./configure --prefix=/usr/local/python3/

                  make

                  sudo make install

    5.输入:python  显示:Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)

    //版本为Python2.6.5,并不是自己所安装的版本,说明此时没有覆盖老版本

    //解决方法:

      1.将原来/usr/bin/python链接改为别的名字:mv /usr/bin/python /usr/bin/python_old

      2.再建立新版本python的链接:sudo ln -s /usr/local/python3/bin/python3 /usr/bin/python

      这个时候输入python,就会显示出python的新版本信息如下:

      Python 3.3.3 (default, Jan  7 2014, 21:37:42)

      [GCC 4.4.3] on linux

    PS:如果不建立新安装路径python3,而是直接默认安装,则安装后的新python应该会覆盖linux下自带的老版本,也有可能不覆盖,具体看安装过程了,这个大家可以自己试验下,当然如果还想保留原来的版本,那么上述方法最好不过了。

  • 相关阅读:
    c++11 standardized memory model 内存模型
    C++和C API调用
    c+11 std::condition_variable and mutex
    Linux thread process and kernel mode and user mode page table
    c++ Initialization
    c++11 perfect forwarding
    C++11 template parameter deduction
    Cache缓存设计
    c++11 enable_shared_from_this
    大数相乘
  • 原文地址:https://www.cnblogs.com/fendou-999/p/3518212.html
Copyright © 2011-2022 走看看