Windows下安裝Tensorflow報錯 “DLL load failed:找不到指定的模組"

來源:互聯網
上載者:User

標籤:extern   sage   text   turn   ges   fail   lin   site   wrap   

  Windows下安裝完tensorflow後,在cmd下運行python後import tensorflow出現如下錯誤:

  Traceback (most recent call last): 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 18, in swig_import_helper 
  return importlib.import_module(mname) 
  File “D:\Python\Python35\lib\importlib__init__.py”, line 126, in import_module 
  return _bootstrap._gcd_import(name[level:], package, level) 
  File “frozen importlib._bootstrap”, line 986, in _gcd_import 
  File “frozen importlib._bootstrap”, line 969, in _find_and_load 
  File “frozen importlib._bootstrap”, line 958, in _find_and_load_unlocked 
  File “frozen importlib._bootstrap”, line 666, in _load_unlocked 
  File “frozen importlib._bootstrap”, line 577, in module_from_spec 
  File “frozen importlib._bootstrap_external”, line 906, in create_module 
  File “frozen importlib._bootstrap”, line 222, in _call_with_frames_removed 
  ImportError: DLL load failed: 找不到指定的模組。

  (省略一些)。。。。。。

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last): 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 41, in module 
  from tensorflow.python.pywrap_tensorflow_internal import * 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 21, in module 
  _pywrap_tensorflow_internal = swig_import_helper() 
  File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py”, line 20, in swig_import_helper   
  return importlib.import_module(‘_pywrap_tensorflow_internal’) 
  File “D:\Python\Python35\lib\importlib__init__.py”, line 126, in import_module 
  return _bootstrap._gcd_import(name[level:], package, level) 
  ImportError: No module named ‘_pywrap_tensorflow_internal’

  Failed to load the native TensorFlow runtime.

  See https://www.tensorflow.org/install/install_sources#common_installation_problems

  for some common reasons and solutions. Include the entire stack trace  above this error message when asking for help.

  博主在尋找問題解決方案的時候,有說需要安裝Anaconda,我是直接安裝的python3.5.3版本,沒有使用anaconda。又有的說需要安裝visual studio 2017,事實上只是vs2017剛好有運行tensorflow的環境,所以我們需要做的只是安裝缺少的環境即可。在下面的連結中下載對應版本(23位和64位),進行安裝就可以。

  https://www.microsoft.com/en-us/download/details.aspx?id=53587

  繼續在cmd下執行python,import tensorflow as tf,不報錯即說明安裝成功啦。

   附上非官方windows下python extension packages的whl包連結:http://www.lfd.uci.edu/~gohlke/pythonlibs/

 

 

  

著作權聲明:

王老頭
出處:http://www.cnblogs.com/wmr95/p/7677791.html
本文著作權歸作者和部落格園共有,歡迎轉載,但未經作者同意必須保留此段聲明,並在文章頁面明顯位置給出原文連結,否則,作者將保留追究法律責任的權利。

 

Windows下安裝Tensorflow報錯 “DLL load failed:找不到指定的模組"

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.