seogheoni4173863
@seogheoni4173863
Reviews Written
-
Average Rating
-
Posts
Q&A
TypeError: in user code: TypeError: Can not convert a NoneType into a Tensor or Operation.
์ฑ์์๋ ๋ต๋ณ ๊ณ ๋ง์ต๋๋ค. ๋๋๋ก ํผ์ ํด๊ฒฐํ๋ ค๊ณ ๋ ธ๋ ฅํ๋๋ฐ ์๋๋ ๊ตฐ์. ์ ์๋์ ๋ง์๋๋ก ์๋ํ์ผ๋ ๋ค์๊ณผ ๊ฐ์ ๊ฒฐ๊ณผ๊ฐ ๋์์ต๋๋ค. ๋ฌผ๋ก anaconda3๋ฅผ ์ญ์ ํ๊ณ , pip ์ด๋ conda๋ฅผ ์ด์ฉํด์ tensorflow๋ฅผ ๋ชจ๋ ์ญ์ ํ๊ณ python 3.7.7 tensorflow 2.2.0(cpu) numpy 1.19.3์ ์๋ก ๊น์์ต๋๋ค. ์ด์ ์ ๊น tensorflow๋ฅผ ์ ๋ถ ์ญ์ ํ๋ค๊ณ ํ๋๋ฐ ๋ ์ญ์ ๋์๋ ์ถ๊ธฐ๋ ํ๊ณ ... ๋งค๋ฒ ์ฃ์กํฉ๋๋ค. import tensorflow as tf import matplotlib import gym import numpy as np print(tf.__version__) ImportError Traceback (most recent call last) c:\python377\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in 57 ---> 58 from tensorflow.python.pywrap_tensorflow_internal import * 59 c:\python377\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in 27 return _mod ---> 28 _pywrap_tensorflow_internal = swig_import_helper() 29 del swig_import_helper c:\python377\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py in swig_import_helper() 23 try: ---> 24 _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) 25 finally: c:\python377\lib\imp.py in load_module(name, file, filename, details) 241 else: --> 242 return load_dynamic(name, filename, file) 243 elif type_ == PKG_DIRECTORY: c:\python377\lib\imp.py in load_dynamic(name, path, file) 341 name=name, loader=loader, origin=path) --> 342 return _load(spec) 343 ImportError: DLL load failed: DLL ์ด๊ธฐํ ๋ฃจํด์ ์คํํ ์ ์์ต๋๋ค. During handling of the above exception, another exception occurred: ImportError Traceback (most recent call last) C:\Users\ADMINI~1\AppData\Local\Temp/ipykernel_9004/353091140.py in ----> 1 import tensorflow as tf 2 import matplotlib 3 import gym 4 import numpy as np 5 print(tf.__version__) c:\python377\lib\site-packages\tensorflow\__init__.py in 39 import sys as _sys 40 ---> 41 from tensorflow.python.tools import module_util as _module_util 42 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader 43 c:\python377\lib\site-packages\tensorflow\python\__init__.py in 48 import numpy as np 49 ---> 50 from tensorflow.python import pywrap_tensorflow 51 52 # Protocol buffers c:\python377\lib\site-packages\tensorflow\python\pywrap_tensorflow.py in 67 for some common reasons and solutions. Include the entire stack trace 68 above this error message when asking for help.""" % traceback.format_exc() ---> 69 raise ImportError(msg) 70 71 # pylint: enable=wildcard-import,g-import-not-at-top,unused-import,line-too-long ImportError: Traceback (most recent call last): File "c:\python377\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "c:\python377\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "c:\python377\lib\site-packages\tensorflow\python\pywrap_tensorflow_internal.py", line 24, in swig_import_helper _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description) File "c:\python377\lib\imp.py", line 242, in load_module return load_dynamic(name, filename, file) File "c:\python377\lib\imp.py", line 342, in load_dynamic return _load(spec) ImportError: DLL load failed: DLL ์ด๊ธฐํ ๋ฃจํด์ ์คํํ ์ ์์ต๋๋ค. Failed to load the native TensorFlow runtime. See https://www.tensorflow.org/install/errors for some common reasons and solutions. Include the entire stack trace above this error message when asking for help. โ
- 0
- 5
- 1K
Q&A
TypeError: in user code: TypeError: Can not convert a NoneType into a Tensor or Operation.
์ด๋ป๊ฒ ํด์ผ ํ๋์? ์! ์ฐธ, ์ด๋ฐ ํ๊ฒฝ์ด ๋๋๊น jupyter notebook๋ ์คํ์ด ์๋๊ณ ๋ค์๊ณผ ๊ฐ์ error๊ฐ ๋๋๋ผ๊ตฌ์. (base) C:\Users\Administrator>jupyter notebook Traceback (most recent call last): File "C:\ProgramData\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in from notebook.notebookapp import main File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 78, in from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager File "C:\ProgramData\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 18, in from jupyter_client.session import Session File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\session.py", line 41, in from jupyter_client.jsonutil import extract_dates, squash_dates, date_default File "C:\ProgramData\Anaconda3\lib\site-packages\jupyter_client\jsonutil.py", line 11, in from dateutil.tz import tzlocal ImportError: cannot import name 'tzlocal' from 'dateutil.tz' (C:\ProgramData\Anaconda3\lib\site-packages\dateutil\tz\__init__.py)
- 0
- 5
- 1K




