Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get code completion for Tensorflow in PyCharm?

I have installed the tensorflow module and it works in PyCharm. However, I want it to have code completion. Currently I do this:

import tensorflow as tf
hello = tf.constant("Hello, Tensorflow!")

However, PyCharm doesn't suggest or autocomplete functions when I type 'tf'
Is this possible to be done automatically or am I missing something?

I am using Windows 10. Tensorflow is installed natively.

like image 633
user3124306 Avatar asked Dec 15 '16 00:12

user3124306


People also ask

How do I enable code completion in PyCharm?

Go to Settings / Preferences | Editor | General | Postfix Completion and select the Enable postfix completion checkbox.

How do you make a completion code?

Press Ctrl+Alt+S to open the IDE settings and select Editor | General | Code Completion. Under Machine Learning-Assisted Completion, enable the Sort completion suggestions based on machine learning option, and select the languages for which you want to use ML completion.

How do I turn off autocomplete in PyCharm?

Go to File > Settings (or Ctrl + Alt + S ) > [IDE Settings] > Editor > Code Completion. The "Autopopup code completion" setting will determine if the popup opens automatically. Below it, the "Insert selected variant by typing dot, space, etc." is likely the setting you want to turn off.


1 Answers

Watch out whether you are not at the bottom of editor when working on 2 or more monitors. Popups (including autocompletion ones) vanish there. See this https://youtrack.jetbrains.com/issue/IDEA-85749 JetBranins bug - old, still open (and vote it up).

like image 68
Łukasz Ślusarczyk Avatar answered Oct 27 '22 20:10

Łukasz Ślusarczyk