【发布时间】:2016-07-11 11:49:20
【问题描述】:
我在使用 git 和通过 rhc 登录并尝试安装需求文件时都收到以下错误:
The directory '/var/lib/openshift/***/.cache/pip/http' or its parent
directory is not owned by the current user and the cache has been disabled.
Please check the permissions and owner of that directory.
If executing pip with sudo, you may want sudo's -H flag.
You are using pip version 7.1.0, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
我没有尝试使用sudo 进行安装。
我想做的是:
- 通过 rhc 和 ssh 登录:rhc ssh 'app'
- 激活venv:
source $OPENSHIFT_PYTHON_DIR/virtenv/bin/activate pip install -r "$OPENSHIFT_REPO_DIR" requirements.txt
请注意,$OPENSHIFT_PYTHON_DIR 和 $OPENSHIFT_REPO_DIR 是 OpenShift 提供的用于访问相关文件夹的环境变量。
有什么想法吗?我使用的是 Python 2.7 墨盒。
【问题讨论】:
-
在问题中定义 OPENSHIFT_PYTHON_DIR 和 OPENSHIFT_REPO_DIR
-
@Dombi-Szabolcs:已编辑。
-
我在新的 python-2.7 磁带上遇到了同样的错误。