为什么 TensorFlow WHL 文件不包含所有必需的依赖项?

2023-12-29

系统:windows 10 64位,python 3.6.5 64位。使用蟒蛇。 CUDA 10.0,安装了cudnn。

再会。出于安全原因,我们公司拒绝访问互联网。我从官网下载了TFtensorFlowwhl包:

https: //storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-1.14.0-cp36-cp36m-win_amd64.whl

我尝试使用 pip 安装它:

pip install --upgrade D:\tensorflow_gpu-1.14.0-cp36-cp36m-win_amd64.whl

我收到以下消息:

collecting keras-preprocessing>=1.0.5 (from tensorflow-gpu==1.14.0)
Retrying ....after connection broken by 'NewConnectionError'
......
could not find a version that satifies the requirement keras-preprocessing=>1.0.5.....
no matching distribution found for keras-preprocessing=>1.0.5 (from tensorflow-gpu==1.14.0)

重新启动时,将找不到其他一些 TensorFlow 依赖项,据我了解,pip 根本看不到任何依赖项

我认为 WHL 包具有所有必要的依赖项,但在安装 pip 时,它会尝试从 Internet 下载某些内容。告诉我我做错了什么?

pip 检查张量流结果:

(base) C:\Windows\system32>pip check tensorflow

tensorflow 1.10.0 requires absl-py, which is not installed.
tensorflow 1.10.0 requires astor, which is not installed.
tensorflow 1.10.0 requires gast, which is not installed.
tensorflow 1.10.0 requires grpcio, which is not installed.
tensorflow 1.10.0 requires protobuf, which is not installed.
tensorflow 1.10.0 requires tensorboard, which is not installed.
tensorflow 1.10.0 requires termcolor, which is not installed.
tensorflow-gpu 1.14.0 requires absl-py, which is not installed.
tensorflow-gpu 1.14.0 requires astor, which is not installed.
tensorflow-gpu 1.14.0 requires gast, which is not installed.
tensorflow-gpu 1.14.0 requires google-pasta, which is not installed.
tensorflow-gpu 1.14.0 requires grpcio, which is not installed.
tensorflow-gpu 1.14.0 requires keras-applications, which is not installed.
tensorflow-gpu 1.14.0 requires keras-preprocessing, which is not installed.
tensorflow-gpu 1.14.0 requires protobuf, which is not installed.
tensorflow-gpu 1.14.0 requires tensorboard, which is not installed.
tensorflow-gpu 1.14.0 requires tensorflow-estimator, which is not installed.
tensorflow-gpu 1.14.0 requires termcolor, which is not installed.
distributed 1.21.8 requires msgpack, which is not installed.
tensorflow-gpu 1.14.0 has requirement numpy<2.0,>=1.14.5, but you have numpy 1.14.3.
tensorflow-gpu 1.14.0 has requirement wrapt>=1.11.1, but you have wrapt 1.10.11.

我认为 WHL 包具有所有必要的依赖项

不。轮子不包含所有依赖项,也不应该包含所有依赖项,否则每个轮子都会变得非常臃肿。如果你必须安装tensorflow-gpu(或任何其他轮子)在无法访问互联网的计算机上,执行以下步骤:

  1. 在机器上with访问互联网,运行:

    \> pip download tensorflow-gpu --dest some\dir
    

    (您可以运行此命令并将其传递为--dest包含下载的目录tensorflow_gpu-1.14.0-cp36-cp36m-win_amd64.whl所以你不必再次下载)

    这将下载tensorflow-gpu及其所有依赖树。

  2. 现在将目录(包含下载的所有文件)传输到计算机without互联网访问并运行:

    \> pip install tensorflow-gpu --no-index --find-links some\dir
    

    --no-index将指示pip不要在网上查找包裹,--find-links将指向可以找到安装包的本地目录。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

为什么 TensorFlow WHL 文件不包含所有必需的依赖项? 的相关文章

  • Matplotlib 标准化颜色条 (Python)

    我正在尝试使用 matplotlib 当然还有 numpy 绘制轮廓图 它有效 它绘制了它应该绘制的内容 但不幸的是我无法设置颜色条范围 问题是我有很多图 并且需要所有图都具有相同的颜色条 相同的最小值和最大值 相同的颜色 我复制并粘贴了在
  • 使用 Django 的 post_save() 信号

    我有两张桌子 class Advertisement models Model created at models DateTimeField auto now add True author email models EmailField
  • 如何更改充当按钮的范围的文本

    我正在为自定义 Web 应用程序编写自动化测试 我遇到了无法更改跨度文本的问题 我尝试过使用 driver execute script 但没有运气 如果我更好地了解 javascript 这确实会有帮助 据我所知 您无法单击跨度 并且列表
  • Dask DataFrame 的逐行处理

    我需要处理一个大文件并更改一些值 我想做这样的事情 for index row in dataFrame iterrows foo doSomeStuffWith row lol doOtherStuffWith row dataFrame
  • 获取单个方程的脚本

    在文本文件中输入 a 2 8 b 3 9 c 4 8 d 5 9 e a b f c d g 0 6 h 1 7 i e g j f h output i j 期望的输出 输出 2 8 3 9 0 6 4 8 5 9 1 7 如果输入文件名
  • 在 Python 中使用 sec 函数的反函数

    我正在创建一个程序 用于计算从一定高度范围和设定初始速度发射射弹的最佳角度 在我需要使用的最终方程中 存在一个反 sec 函数 它导致了一些麻烦 我已经导入了数学并尝试使用 asec 无论如何 但是数学似乎无法计算反秒函数 我也明白 sec
  • 无法包含外部 pandas 文档 Pycharm v--2018.1.2

    我无法包含外部 pandas 文档Pycharm v 2018 1 2 例如 numpy gt http docs scipy org doc numpy reference generated module name element na
  • VSCode pytest 测试发现失败

    Pytest 测试发现失败 用户界面指出 Test discovery error please check the configuration settings for the tests 输出窗口显示 Test Discovery fa
  • 唯一的图像哈希值即使 EXIF 信息更新也不会改变

    我正在寻找一种方法来为 python 和 php 中的图像创建唯一的哈希值 我考虑过对原始文件使用 md5 和 因为它们可以快速生成 但是当我更新 EXIF 信息 有时时区关闭 时 它会更改总和 并且哈希也会更改 有没有其他方法可以为这些文
  • 反加入熊猫

    我有两个表 我想附加它们 以便仅保留表 A 中的所有数据 并且仅在其键唯一时添加表 B 中的数据 键值在表 A 和 B 中是唯一的 但在某些情况下键将出现在表 A 和 B 中 我认为执行此操作的方法将涉及某种过滤联接 反联接 以获取表 B
  • 在wxpython中使用wx.TextCtrl并在按钮单击后显示数据的简单示例 - wx新手

    我正在学习 python 并尝试使用 wxpython 进行 UI 开发 也没有 UI exp 我已经能够创建一个带有面板 按钮和文本输入框的框架 我希望能够在文本框中输入文本 并让程序在单击按钮后对输入框中的文本执行操作 我可以获得一些关
  • Python int 太大,无法放入 SQLite

    我收到错误 OverflowError Python int 太大 无法转换为 SQLite INTEGER 来自以下代码块 该文件约25GB 因此必须分部分读取 length 6128765 Works on partitions of
  • 在 pip.conf 中指定多个可信主机

    这是我尝试在我的中设置的 etc pip conf global trusted host pypi org files pythonhosted org 但是 它无法正常工作 参考 https pip pypa io en stable
  • WindowsError:[错误 5] 访问被拒绝

    我一直在尝试终止一个进程 但我的所有选项都给出了 Windows 访问被拒绝错误 我通过以下方式打开进程 一个python脚本 test subprocess Popen sys executable testsc py 我想杀死那个进程
  • 是否可以写一个负的python类型注释

    这可能听起来不合理 但现在我需要否定类型注释 我的意思是这样的 an int Not Iterable a string Iterable 这是因为我为一个函数编写了一个重载 而 mypy 不理解我 我的功能看起来像这样 overload
  • asyncio - 多次等待协程(周期性任务)

    我正在尝试为异步事件循环创建定期任务 如下所示 但是我收到 RuntimeError 无法重用已等待的协程 异常 显然 asyncio 不允许等待相同的可等待函数 如中讨论的这个错误线程 https bugs python org issu
  • 如何在单独的文件中使用 FastAPI Depends 作为端点/路由?

    我在单独的文件中定义了一个 Websocket 端点 例如 from starlette endpoints import WebSocketEndpoint from connection service import Connectio
  • Google App Engine 中的自定义身份验证

    有谁知道或知道我可以在哪里学习如何使用 Python 和 Google App Engine 创建自定义身份验证流程 我不想使用 Google 帐户进行身份验证 并且希望能够创建自己的用户 如果不是专门针对 Google App Engin
  • 如何对字符串列表进行排序?

    在 Python 中创建按字母顺序排序的列表的最佳方法是什么 基本回答 mylist b C A mylist sort 这会修改您的原始列表 即就地排序 要获取列表的排序副本而不更改原始列表 请使用sorted http docs pyt
  • 如何识别图形线条

    我有以下格式的路径的 x y 数据 示例仅用于说明 seq p1 p2 0 20 2 3 1 20 2 4 2 20 4 4 3 22 5 5 4 22 5 6 5 23 6 2 6 23 6 3 7 23 6 4 每条路径都有多个点 它们

随机推荐