IDE autocomplete for pytorch

烈酒焚心 提交于 2019-12-22 07:51:53

问题


I'm using Visual Studio Code. Recently tried out Kite. Both of which doesn't seem to have autocomplete for pytorch.

Is is possible with these tools ? If not, can someone suggest an editor that does ?

Thank you!


回答1:


Use Pycharm https://www.jetbrains.com/pycharm/
Get Community version, because it is free with debugger and autocomplete. (more than enough for student)

To get autocomplete and run/debug the code on Pycharm IDE, you have to set correct project interpreter path to your environment (or virtual environment) which you install pytorch

The screenshot shows that I set Project Interpreter path to conda environment named 'pytorch', which I install Pytorch.




回答2:


Spyder does autocomplete for PyTorch as well




回答3:


Both Spyder and PyCharm have auto-complete feature for the installed libraries. But this feature does not seem to work for the local project files (functions, classes, variables defined in the local files even if they are imported).

They also have "go to definition" and "help", but again, only for the installed libraries.

I hope these features will be included soon, in addition to "references to this variable/function/class", which is available in advanced IDEs and is quite useful.



来源:https://stackoverflow.com/questions/43287476/ide-autocomplete-for-pytorch

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