尝试在OpenShift上使用pip时出错

时间:2016-07-11 11:49:21

标签: pip openshift

我在使用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进行安装 我想做的是:

  1. 通过rhc和ssh登录:rhc ssh'app'
  2. 激活venv:source $OPENSHIFT_PYTHON_DIR/virtenv/bin/activate
  3. pip install -r "$OPENSHIFT_REPO_DIR" requirements.txt
  4. 请注意,$OPENSHIFT_PYTHON_DIR$OPENSHIFT_REPO_DIR是OpenShift为访问相关文件夹而提供的环境变量。

    有什么想法吗?我使用的是Python 2.7磁带。

1 个答案:

答案 0 :(得分:0)

Openshift将根据requirements.txt文件自动安装您的依赖项。因此,您不应该进入自己的应用程序并自己动手。

您可以在开发者中心页面上找到有关它的更多信息。 [1]

相关问题