我正在尝试安装版本为 2.0.0-alpha0 的 tensorflow-gpu。我试过这两个特定的命令:
pip install tensorflow-gpu==2.0.0-alpha0
pip install -U --pre tensorflow-gpu==2.0.0-alpha0
pip 说:
Collecting tensorflow-gpu==2.0.0-alpha0
Could not find a version that satisfies the requirement tensorflow-gpu==2.0.0-alpha0 (from versions: )
No matching distribution found for tensorflow-gpu==2.0.0-alpha0
但是 pypi 上的 tensorflow-gpu 页面肯定有版本 2.0.0-alpha0。我知道我可以从源代码构建或直接从 pypi 下载包,但我更想了解为什么会这样。
我做错了什么? 我还使用 pip 18.1 和 19.0.3 尝试了上述命令以达到相同目的。
我阅读了 pip 文档并发现了以下内容:
Starting with v1.4, pip will only install stable versions as specified by pre-releases by default.
The pip install command also supports a –pre flag that enables installation of pre-releases and development releases.
--pre Include pre-release and development versions. By default, pip only finds stable versions.
请您参考如下方法:
实际版本为2.0.0a0 ,而不是 2.0.0-alpha0。你想要:
pip install --pre tensorflow-gpu==2.0.0a0
您还需要在兼容的 Windows 或 Linux 系统上运行它。该项目仅publishes releases对于:
- Linux,适用于 Python 2.7、3.3、3.4、3.5、3.6 和 3.7,配备 x86_64 CPU
- Windows,适用于 Python 3.5、3.6、3.7,配备 amd64 CPU
