问题
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