Code: Alles auswählen
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
Wenn ich cmd neu starte, und import tensorflow in python mache, kommt derselbe Fehler. Er verschwindet, wenn ich vorm Starten von python "activate tensorflow" mache.ModuleNotFoundError: No module named 'tensorflow'
Also müsste ich in PyCharm vorm Starten des Programms activate tensorflow machen. Ich habe bei "Run ..." als externes Tool "activate tensorflow" hinzugefügt, aber dann kommt "Cannot run program "activate"". Edit: Ich habe jetzt "C:\Anaconda\Scripts\activate.bat" als externes Tool hinzugefügt, und der Fehler bezüglich des Startens von activate ist jetzt weg. Der Fehler "ModuleNotFoundError: No module named 'tensorflow'" kommt allerdings immer noch.