Python Forum
Importing tensorflow into pycharm on mac - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Importing tensorflow into pycharm on mac (/thread-29199.html)



Importing tensorflow into pycharm on mac - jrs92 - Aug-22-2020

I know there are a million videos explaining how to do this, but I'm still having trouble.

I was following this video tutorial, the megcourse on machine learning

https://www.youtube.com/watch?v=WFr2WgN9_xE&t=677s

Downloaded anaconda and pycharm for mac

in the command window I created my environment and downloaded tensorflow (I think?, it looked the same as in the instructional video.)

Made my project in pycharm and then went to set up my environment for my project. I clicked preferences>python interpreter and clicked on anaconda and then looked in the directory as the video described, but there was no pythonw.exe anywhere


UPDATE:
as I was writing this I tried again, still didn't find a pythonw.exe but just used "python" and then in my project I did "import tensorflow as tf" and got this message explaining some stuff about tensorflow

assuming that means it worked?? It's no longer underlined but that line of code is all grey?
I guess my question now is is there anything else I need to know?

Thanks!


RE: Importing tensorflow into pycharm on mac - jefsummers - Aug-22-2020

Try
tf.__version__
If it replies with a number like 2.3.0 you are good


RE: Importing tensorflow into pycharm on mac - jrs92 - Aug-22-2020

Thanks! It seems like it's good to go. But now I've got a errno2 so it won't run.

/Users/jerod/opt/anaconda3/envs/tensor/bin/python: can't open file '/Users/jerod/PycharmProjects/Megacourse/main.py': [Errno 2] No such file or directory

Process finished with exit code 2


EDIT:
jk fixed it, thanks!