我在使用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
进行安装
我想做的是:
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磁带。
答案 0 :(得分:0)
Openshift将根据requirements.txt
文件自动安装您的依赖项。因此,您不应该进入自己的应用程序并自己动手。
您可以在开发者中心页面上找到有关它的更多信息。 [1]