中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》
  • 首頁 > 
  • 教程 > 
  • 開發技術 > 
  • windows上安裝tensorflow時報錯,“DLL load failed: 找不到指定的模塊”怎么辦

windows上安裝tensorflow時報錯,“DLL load failed: 找不到指定的模塊”怎么辦

發布時間:2020-07-23 10:35:59 來源:億速云 閱讀:462 作者:小豬 欄目:開發技術

這篇文章主要為大家展示了windows上安裝tensorflow時報錯,“DLL load failed: 找不到指定的模塊”怎么辦,內容簡而易懂,希望大家可以學習一下,學習完之后肯定會有收獲的,下面讓小編帶大家一起來看看吧。

最近打算開始研究一下機器學習,今天在windows上裝tensorflow花了點功夫,其實前面的步驟不難,只要依次裝好python3.5,numpy,tensorflow就行了,有一點要注意的是目前只有python3.5能裝tensorflow,最新版的python3.6都不行。

裝好tensorflow后,我建議大家不要直接用測試用例進行測試(如果沒裝好的話出現的錯誤一般都是:module ‘tensorflow' has no attribute ‘constant')。第一次測試時可以在python shell里面輸入:

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'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “pyshell#0”, line 1, in module
import tensorflow
File “D:\Python\Python35\lib\site-packages\tensorflow__init__.py”, line 24, in module
from tensorflow.python import *
File “D:\Python\Python35\lib\site-packages\tensorflow\python__init__.py”, line 51, in module
from tensorflow.python import pywrap_tensorflow
File “D:\Python\Python35\lib\site-packages\tensorflow\python\pywrap_tensorflow.py”, line 52, in module
raise ImportError(msg)
ImportError: 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.

Seehttps://www.tensorflow.org/install/install_sources

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

之前在網上查安裝方法時,大多數都說要裝一個Anaconda,但我是直接裝的python3.5,所以沒裝Anaconda,我相信問題不在這里。后來看到有人說裝了visual studio2017解決了這個錯誤,我想不至于吧,裝個tensorflow還要裝個visual studio2017?事實上只是visual studio2017中剛好有運行tensorflow必須的運行時環境。所以,只要安裝一下缺少的運行時環境就可以了,可以在如下網站中按照它的install instructions進行安裝,非常簡單,只要注意選對32位和64位的版本就行了。

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

裝好后tensorflow就可以正常使用了~

以上就是關于windows上安裝tensorflow時報錯,“DLL load failed: 找不到指定的模塊”怎么辦的內容,如果你們有學習到知識或者技能,可以把它分享出去讓更多的人看到。

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

专栏| 广西| 墨竹工卡县| 叶城县| 黔西| 左贡县| 温州市| 舒兰市| 榆树市| 灌阳县| 乳山市| 资讯| 河津市| 平邑县| 台山市| 林周县| 合阳县| 沧源| 志丹县| 江城| 应城市| 如皋市| 彭阳县| 久治县| 陕西省| 疏勒县| 云浮市| 齐齐哈尔市| 永嘉县| 江北区| 内乡县| 松原市| 望城县| 云龙县| 原平市| 陆河县| 呼图壁县| 七台河市| 雅江县| 麦盖提县| 宁蒗|