简体   繁体   English

pyhton 3.9 中的张量流问题

[英]tensorflow issue in pyhton 3.9

im using the below packages but somehow im getting the below error:我正在使用以下软件包,但不知何故我收到以下错误:

import numpy
import tflearn
import tensorflow
import random

Error:错误:

2020-10-18 23:50:57.727315: W tensorflow/stream_executor/platform/default/dso_loader.cc:59] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll
 not found
2020-10-18 23:50:57.729741: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
Traceback (most recent call last):
  File "main.py", line 6, in <module>
    import tflearn
  File "C:\Users\sayan\anaconda3\envs\chatbot\lib\site-packages\tflearn\__init__.py", line 4, in <module>
    from . import config
  File "C:\Users\sayan\anaconda3\envs\chatbot\lib\site-packages\tflearn\config.py", line 5, in <module>
    from .variables import variable
  File "C:\Users\sayan\anaconda3\envs\chatbot\lib\site-packages\tflearn\variables.py", line 7, in <module>
    from tensorflow.contrib.framework.python.ops import add_arg_scope as contrib_add_arg_scope
ModuleNotFoundError: No module named 'tensorflow.contrib'

The main error occurs due to missing module tensorflow.contrib .主要错误是由于缺少模块tensorflow.contrib I believe tflearn may have that as a dependency.我相信tflearn可能会将其作为依赖项。 Newer versions of tensorflow (>2.0) does not include contrib module.较新版本的 tensorflow (>2.0) 不包含 contrib 模块。

You may be able to resolve the issue by upgrading tflearn to the latest version.您可以通过将tflearn升级到最新版本来解决该问题。 As per their docs TF2.0 is supported now.根据他们的文档,现在支持 TF2.0。 ( Installation instructions here ) 安装说明在这里

Other than that you have a warning (W) and information (I) provided by tensorflow .除此之外,您还有tensorflow提供的警告 (W) 和信息 (I)。

  1. Warning states that it is not able to access cuda files for GPU support.警告指出它无法访问用于 GPU 支持的 cuda 文件。
  2. Information says you can ignore the warning if you are not using GPU.信息表明,如果您不使用 GPU,则可以忽略该警告。

Do you wish to use tensorflow with GPU support?您是否希望使用具有 GPU 支持的 tensorflow? This may require installation of cuda and other dependencies.这可能需要安装 cuda 和其他依赖项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM