Cannot import tensorflow inside the project folder

你。 提交于 2021-01-28 07:16:17

问题


I can import tensorflow in my home directory but when I change to project directory I am getting import error as you can see in below screenshot

You can see the project folder content also in the screenshot, even if I remove the __pycache__ folder it recreates it again with the same error.
Last line of error:
ImportError: cannot import name 'constant' from partially initialized module 'tensorflow.python.framework.constant_op' (most likely due to a circular import) (/home/prakhar/.local/lib/python3.8/site-packages/tensorflow/python/framework/constant_op.py)

Version details:

  • Python version: 3.8.2
  • Tensorflow version: 2.3.1
  • No CUDA installed since I do not need GPU support

来源:https://stackoverflow.com/questions/64555814/cannot-import-tensorflow-inside-the-project-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!