我在manage.openshift.com上创建了一个模拟账户,并从python 2.7图像开始创建了一个应用程序。
我已经推出了一个带有内部tensorflow依赖关系的requirements.txt并开始构建。
我的构建日志中出现此错误:
You are using pip version 7.1.0, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Collecting pip==9.0.1 (from -r requirements.txt (line 1))
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
Collecting tensorflow (from -r requirements.txt (line 2))
Could not find a version that satisfies the requirement tensorflow (from -r requirements.txt (line 2)) (from versions: )
No matching distribution found for tensorflow (from -r requirements.txt (line 2))
error: build error: non-zero (13) exit code from registry.access.redhat.com/rhscl/python-27-rhel7@sha256:69cc225a61cec131f43915ba3cd26edf3692d0d53f9a2df4eba5ed6f70410cdc
如何更新pip并安装tensorflow?
答案 0 :(得分:1)
tensorflow
包可能与旧的pip
版本不兼容。在OpenShift上的应用程序的构建配置中,添加一个环境变量:
UPGRADE_PIP_TO_LATEST=1
或者,在您的Git仓库中,添加一个文件.s2i/environment
并将环境变量设置粘贴在其中。
该环境变量应强制S2I构建器在安装requirements.txt
文件中的任何软件包之前升级pip。
唯一的另一种可能性是您在requirements.txt
文件中使用固定版本,并且某些版本标记出现错误并导致问题。