Python Tensorflow-Intel 在 Linux 上不存在
我刚开始学习Python。我们有一个在Azure上的Python函数。现在我们需要更新它使用的包。有一些包是:
tensorflow==2.15.0
tensorflow-estimator==2.15.0
tensorflow-intel==2.15.0
tensorflow-io-gcs-filesystem==0.31.0
我在我的Windows电脑上测试了这些包的Windows版本。现在我需要下载并上传这些包的Linux版本到我们的Python包库。
当我尝试用以下命令下载这些包时:
python -m pip download --trusted-host pypi.org --trusted-host files.pythonhosted.org --proxy="http://127.0.0.1:8888/" -r requirements.txt --prefer-binary --only-binary=:all: -d C:\Python\Scoring\mlp\LinuxPackages --platform manylinux_2_17_x86_64 --platform manylinux2010_x86_64 --python-version 3.11
我得到了所有的包,除了tensorflow。我收到了以下错误信息:
INFO: pip is looking at multiple versions of tensorflow to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 0.28.0 Requires-Python >=3.7, <3.11
ERROR: Could not find a version that satisfies the requirement tensorflow-intel==2.15.0; platform_system == "Windows" (from tensorflow) (from versions: 0.0.1)
ERROR: No matching distribution found for tensorflow-intel==2.15.0; platform_system == "Windows"
当我在pypi.org上查看tensorflow-intel时,我看到只有Windows的文件,没有可以用来构建wheel文件的源代码压缩包。
我已经从pypi.org下载了主要的tensorflow包,并且我运行了我的Azure函数,似乎在没有tensorflow-intel包的情况下也能正常工作,但我担心可能会出现问题。我并不是这个函数的创建者,我们团队里也没有Python方面的专家。
从我查看的包库来看,里面没有tensorflow-intel包,而且这个包在最初的requirements.txt文件中也没有列出。但我不知道更新后的tensorflow包是否依赖于tensorflow-intel。看起来是有依赖关系的。
有没有办法把Windows包转换成源代码分发的文件,这样我就可以创建一个与Linux兼容的whl文件?或者,我还有什么其他选择?
1 个回答
注意:从TensorFlow 2.10开始,针对Aarch64/ARM64处理器的Linux CPU版本是由第三方AWS负责构建、维护、测试和发布的。在ARM机器上安装tensorflow包时,会安装AWS的tensorflow-cpu-aws包。这些包是按原样提供的。TensorFlow会尽量保证这个pip包的可用性和完整性。如果第三方未能及时发布pip包,可能会导致延迟。想了解更多关于这次合作的信息,可以查看这篇博客文章。
也许 tensorflow-cpu-aws
是你需要的那个。
你可以使用以下命令安装:
pip install tensorflow-cpu-aws