【问题标题】:Failed to import the TensorFlow module导入 TensorFlow 模块失败
【发布时间】:2018-01-27 11:01:23
【问题描述】:

我在安装 tensorflow 时遇到问题。 我得到了一个mrry/tensorflow_self_check.py 脚本并做了一些调整MurDoDePar / tensorflow_self_check.py

我得到这个结果:

- Python version is 3.6.
- TensorFlow is installed at: C:\Users\domin\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow
*** Failed to import the TensorFlow module.
- Find msvcp140.dll
- Find cudart64_91.dll
- Find nvcuda.dll
- Find cuDNN 7 cudnn64_7.dll.

*** ERROR Liste
    - Failed to import the TensorFlow module.

如果我下订单pip3 install --ignore-installed --upgrade tensorflow 我有错误:

C:\Users\domin>pip3 install --ignore-installed --upgrade tensorflow-gpu
Collecting tensorflow-gpu
  Using cached tensorflow_gpu-1.5.0-cp36-cp36m-win_amd64.whl
Collecting tensorflow-tensorboard<1.6.0,>=1.5.0 (from tensorflow-gpu)
  Using cached tensorflow_tensorboard-1.5.0-py3-none-any.whl
...OK
  Using cached setuptools-38.4.0-py2.py3-none-any.whl
Installing collected packages: six, html5lib, numpy, markdown, wheel, werkzeug, setuptools, protobuf, bleach, futures, tensorflow-tensorboard, absl-py, tensorflow-gpu
Exception:
Traceback (most recent call last):
  File "c:\users\domin\appdata\local\programs\python\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\users\domin\appdata\local\programs\python\python36\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\users\domin\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\users\domin\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "c:\users\domin\appdata\local\programs\python\python36\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "c:\users\domin\appdata\local\programs\python\python36\lib\site-packages\pip\wheel.py", line 345, in move_wheel_files
    clobber(source, lib_dir, True)
  File "c:\users\domin\appdata\local\programs\python\python36\lib\site-packages\pip\wheel.py", line 323, in clobber
    shutil.copyfile(srcfile, destfile)
  File "c:\users\domin\appdata\local\programs\python\python36\lib\shutil.py", line 121, in copyfile
    with open(dst, 'wb') as fdst:
PermissionError: [Errno 13] Permission denied: 'c:\\users\\domin\\appdata\\local\\programs\\python\\python36\\Lib\\site-packages\\numpy\\.libs\\libopenblas.BNVRK7633HSX7YVO2TADGR4A5KEKXJAW.gfortran-win_amd64.dll'

我被困住了,你能帮帮我吗?

【问题讨论】:

    标签: python tensorflow


    【解决方案1】:

    您似乎没有安装它的权限。

    您可以尝试使用 python 可执行文件运行它,如 pip install access denied on Windows 中所述

    或者您可以尝试以管理员身份运行 CMD,然后再次尝试安装。

    【讨论】:

    • 谢谢我安装了python -m pip install mitmproxy pip install Django python -m pip install 用cmd启动了pip3 install --ignore-installed --upgrade tensorflow,然后按CTRL + SHIFT + ENTER。 , 我有同样的问题。我是 radu 帐户,我有 2 个在后台打开的 python 我杀死了两个并且安装通过了。
    • 是的,谢谢,我没有找到解决问题的方法。
    • 这道题的分数下面应该有一个复选标记,您可以点击标记它为已解决。
    猜你喜欢
    • 2019-04-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-12-03
    • 2020-03-30
    • 2019-03-30
    相关资源
    最近更新 更多