ImportError: dynamic module does not define init function (PyInit__tf2) [closed]

asked 2018-03-17 15:24:52 -0600

RohitM gravatar image

I'm running Python 2.7 and when I try to import tf I'm getting the error as mentioned in the question.

This is pretty confusing because according to the issue this is a problem in Python 3 not in Python 2.7.

Any help will be much appreciated, thanks!

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2018-03-18 01:16:08.164777



Please edit your question to provide enough information to reproduce your problem. This is a standard module used by default with python 2.7 so you must be doing something different than standard. Otherwise we can't really help you.

tfoote gravatar image tfoote  ( 2018-03-17 15:30:40 -0600 )edit

Sorry mate, I wrongly thought that I was using Python 2.7. I checked my virtual environment and I was actually running Python 3.5. Using the suggestions in the related issue that I had linked helped solve the problem. Thanks!

RohitM gravatar image RohitM  ( 2018-03-18 00:52:23 -0600 )edit