没有root的安装Python 2.7 [英] Installing Python 2.7 without root

查看:85
本文介绍了没有root的安装Python 2.7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试在远程Linux机器上安装没有root权限的Python 2.7.我运行了命令

I tried installing Python 2.7 without root on a remote linux machine. I ran the commands

./configure prefix=/  
make install DESTDIR=/xxx/yyy/ 

其中/xxx/yyy/是我具有读写访问权限的目录.

where /xxx/yyy/ is a directory for which I have read-write access.

最后我遇到了一个问题.它说:

I ran into a problem at the end. It said:

使用gdbm信息构建dbm信息:无法 找到Tcl/Tk库和/或头文件

building dbm using gdbm INFO: Can't locate Tcl/Tk libs and/or headers

Python构建完成,但是 构建这些模块所需的位 找不到: _tkinter bsddb185 dl imageop sunaudiodev至 找到必要的位,看一下 在detect_modules()中的setup.py 模块的名称.

Python build finished, but the necessary bits to build these modules were not found: _tkinter bsddb185 dl imageop sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name.

正在运行build_scripts正在运行 install_lib创建/lib/python2.7 错误:无法创建 '/lib/python2.7':权限被拒绝

running build_scripts running install_lib creating /lib/python2.7 error: could not create '/lib/python2.7': Permission denied

我是否在没有root访问权限的情况下采取了正确的安装步骤? (即我的configure和make命令?)有人可以告诉我为什么它无法正确安装吗?

Did I take the correct steps in installing it without root access? (i.e., my configure and make commands?) Can anyone tell me why it would not install properly?

谢谢,
ktm

Thanks,
ktm

推荐答案

我只是在没有管理员权限的情况下安装了python2.7.5.我认为命令应该是:

I just install python2.7.5 without admin right. I think the command should be:

./configure prefix=/xxx/yyy
make install

,然后应在.bashrc中将路径/xxx/yyy/bin添加为:

and then you should add the path /xxx/yyy/bin in .bashrc as:

PYTHONPATH=/home/songmeixu/python/bin
export PATH=$PYTHONPATH:$PATH

这篇关于没有root的安装Python 2.7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆