Gitlab-CI.yml、requirements.txt和Tensorflow

Gitlab-CI.yml、requirements.txt和Tensorflow,tensorflow,gitlab,gitlab-ci,requirements.txt,Tensorflow,Gitlab,Gitlab Ci,Requirements.txt,我需要将Tensorflow添加到我的requirement.txt中。首先,我添加了没有特定版本的“tensorflow”,但在Gitlab CI中,linters提供了我需要添加特定版本的信息,因此我添加了它,它看起来像“tensorflow==2.0.0-rc0”,但在Gitlab CI中,我得到了: ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0-rc0 (from -r r

我需要将Tensorflow添加到我的requirement.txt中。首先,我添加了没有特定版本的“tensorflow”,但在Gitlab CI中,linters提供了我需要添加特定版本的信息,因此我添加了它,它看起来像“tensorflow==2.0.0-rc0”,但在Gitlab CI中,我得到了:

ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0-rc0 (from -r requirements.txt (line 2)) (from versions: none)
ERROR: No matching distribution found for tensorflow==2.0.0-rc0 (from -r requirements.txt (line 2))
CI返回:

$ python --version
Python 3.8.0
$ pip install --upgrade pip
Requirement already up-to-date: pip in /usr/local/lib/python3.8/site-packages (19.3.1)
$ pip install --upgrade setuptools
Collecting setuptools
  Downloading https://files.pythonhosted.org/packages/54/28/c45d8b54c1339f9644b87663945e54a8503cfef59cf0f65b3ff5dd17cf64/setuptools-42.0.2-py2.py3-none-any.whl (583kB)
Installing collected packages: setuptools
  Found existing installation: setuptools 41.6.0
    Uninstalling setuptools-41.6.0:
      Successfully uninstalled setuptools-41.6.0
Successfully installed setuptools-42.0.2
$ pip install -r requirements.txt
Collecting numpy==1.16.4
  Downloading https://files.pythonhosted.org/packages/d3/4b/f9f4b96c0b1ba43d28a5bdc4b64f0b9d3fbcf31313a51bc766942866a7c7/numpy-1.16.4.zip (5.1MB)
ERROR: Could not find a version that satisfies the requirement tensorflow==2.0.0-rc0 (from -r requirements.txt (line 2)) (from versions: none)
ERROR: No matching distribution found for tensorflow==2.0.0-rc0 (from -r requirements.txt (line 2))
以及我的.gitlab-ci.yml的一部分:

image: "python:3.8"

before_script:
 - python --version
 - pip install --upgrade pip
 - pip install --upgrade setuptools
 - pip install -r requirements.txt

将图像从Python3.8更改为Python3.7“适合我”。所以问题在于最新的Python 3.8

您使用的是哪个
Python
映像?我使用Python 3.8.0尝试运行
pip安装--升级pip&&pip安装--升级setuptools&&pip安装--升级tensorflow==2.0.0-rc0
,但这不起作用。我在before_脚本中将install pip和setup工具添加到CI中,在requirements.txt numpy==1.16.4和tensorflow==2.0.0-rc0中都有。Numpy已成功安装,但tensorflow未成功安装。能否运行
python-c'import struct;打印(8*struct.calcsize(“P”)”)
。它将检查python是32位还是64位