• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
如今在丽江
不一样的要求
博客园    首页    新随笔    联系   管理    订阅  订阅
linux下无root 安装activepython到指定目录
linux下无root 安装activepython到指定目录

linux下无root 安装activepython

1、下载ActivePython-2.7.8.10-linux-x86_64.tar.gz 包

2、进入非root用户,如bdc用户,解压

  [bdc@svr001 python]$ tar  -zxvf  ActivePython-2.7.8.10-linux-x86_64.tar.gz

解压得到ActivePython-2.7.8.10-linux-x86_64 目录

3、进入ActivePython-2.7.8.10-linux-x86_64目录

[bdc@svr001 python]$ cd ActivePython-2.7.8.10-linux-x86_64
[bdc@svr001 ActivePython-2.7.8.10-linux-x86_64]$ ll
总用量 52
drwxrwxr-x. 7 bdc bdc  4096  7月  3 2014 INSTALLDIR
-rw-rw-r--. 1 bdc bdc 14306  7月  3 2014 _install.py
-rwxr-xr-x. 1 bdc bdc   373  7月  3 2014 install.sh
-rwxrwxr-x. 1 bdc bdc 16060  7月  3 2014 sh2.py
-rw-rw-r--. 1 bdc bdc 10229  1月 24 13:18 sh2.pyc

4、查看_install.py 文件

   [bdc@svr001 ActivePython-2.7.8.10-linux-x86_64]$ more  _install.py
#!/usr/bin/env python
# Copyright (c) 2003-2014 ActiveState Software Inc.

#
#********************************************************************
# WARNING: Do not run this script directly. Run the main "./install.sh"
#          which will launch this script properly.
#********************************************************************

"""
    ./install.sh - ActivePython install script

    Usage:
        ./install.sh [options...]

    General Options:
        -h, --help          print this help and exit
        -v, --verbose       verbose output

        -I, --install-dir <dir>     specify install directory

    When called without arguments this script will interactively install
    ActivePython. If the install dir is specified then ActivePython will
    be installed without interaction.

5、用 -I 或--install-dir 参数可安装到指定目录

[bdc@svr001 ActivePython-2.7.8.10-linux-x86_64]$ ./install.sh  -I /opt/aspire/product/bdc/python/python27.8.10
Installing ActivePython to '/opt/aspire/product/bdc/python/python27.8.10'...
Relocating dir-dependent files...
Pre-compiling .py files in the standard library...

ActivePython has been successfully installed to:

    /opt/aspire/product/bdc/python/python27.8.10
   
You can add the following to your .bashrc (or equivalent)
to put ActivePython on your PATH:

    export PATH=/opt/aspire/product/bdc/python/python27.8.10/bin:$PATH

The documentation is available here:

    /opt/aspire/product/bdc/python/python27.8.10/doc/python2.7/index.html
    web: http://docs.activestate.com/activepython/2.7

Please send us any feedback you might have or log bugs here:

    activepython-feedback@ActiveState.com
    http://bugs.activestate.com/ActivePython/

Thank you for using ActivePython.

6、加入环境变量

将以下语句加入到bdc用户的 .bash_prorfile环境变量中,并执行..bash_prorfile生效。

 export PATH=/opt/aspire/product/bdc/python/python27.8.10/bin:$PATH

posted on 2018-01-24 13:58  如今在丽江  阅读(649)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3