回溯(最近通话过去):
File "d:\kuliah\aa\aaa\aaaa\bpnn.py", line 1, in <module>
import tensorflow as tf
File "C:\Users\xxx\AppData\Roaming\Python\Python36\sitepackages\tensorflow\__init__.py", line 24, in <module> from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "C:\Users\xxx\AppData\Roaming\Python\Python36\site-packages\tensorflow\python\__init__.py", line 59, in <module> from tensorflow.core.framework.graph_pb2 import *
File "C:\Users\xxx\AppData\Roaming\Python\Python36\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "C:\Program Files\Python36\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
from google.protobuf.pyext import _message
ImportError: DLL load failed: The specified procedure could not be found.
当我在.py代码上导入我的tensorflow时,发生了什么?
答案 0 :(得分:0)
出现此问题是因为扩展名VScode
和Coderunner
无法激活您正在使用的conda
环境。要解决此问题。
anaconda command prompt
,然后输入activate <your environment name>
code
以启动VSCode
。您的导入现在应该可以正常工作了。谢谢!