没有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
也不会为我安装pip,除非我求他一个月左右.我尝试使用python安装脚本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
很不幸,这给我扔了一个no permission error /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?
推荐答案
我遇到的情况与您相似,因此我选择了Anaconda.您可以使用wget
从此页面下载Anaconda文件.您会很高兴地找到该文件为.sh
文件.
I had the similar case as you and I chose the Anaconda. You can download Anaconda file from this page using wget
. You will happily find the file to be a .sh
file.
使用以下命令安装Anaconda(适用于Python3):
Use the following command to install Anaconda (for Python3):
bash ./Anaconda3-5.0.1-Linux-x86_64.sh
使用以下命令通过pip安装其他软件(SOFTWARE_NAME):
Use the following command to install other software (SOFTWARE_NAME) by pip:
anaconda3/bin/pip install SOFTWARE_NAME
希望它可以为您提供帮助.
Hope it could help you.
这篇关于没有root权限在本地安装pip的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!