在没有root权限的情况下在本地安装pip [英] Installing pip locally without root privileges
问题描述
我正在开发一台运行 Linux 的计算服务器.这台机器被多个用户使用,所以我没有也不会获得 root 权限.我需要安装 Keras
,您通常会使用 pip
I am working on a compute server which runs a linux. The machine is used by several users so I don't have and won't get root privileges.
I need to install Keras
which you would normally do by using pip
现在,pip 没有安装,root
也不会为我安装它,除非我求他大概一个月左右.我尝试使用 python 安装脚本在本地安装 pip Python352/bin/python3.5 get-pip.py --user
Now, pip is not installed and the root
won't install it for me either unless I beg him for probably a month or so. I tried to locally install pip with the python installation scrip Python352/bin/python3.5 get-pip.py --user
不幸的是,这向我抛出了一个无权限错误/etc
.这不是我在本地安装该工具所期望的.是否有可能以某种方式安装 pip 而不尝试触及我本地目录之外的任何内容?
This unfortunately throws me an no permission error /etc
. This is not exactly what I expected from installing the tool locally. Is it somehow possible to make an installation of pip that does not try to touch anything outside my local directory?
推荐答案
这里是最新版本的安装 pip (python) 给没有 root 访问方法的用户:
Here is the up-to-date version to install pip (python) to user without root access method:
`wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py && python get-pip.py --user`
这篇关于在没有root权限的情况下在本地安装pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!