I was not sure to create a new topic as a very similar topics exists, but putting this under the vim title might not have brought you here in the first place
If you don’t want to rely on GoogleColab completely and want to setup swift locally and use it inside VSCode, follow the steps at https://bit.ly/2SYWZzB
You need to remember few things
- Some of the steps (specially 7 and 8) might not work straight away for you and my advice is DON’T PANIC!
- All you need to do is look at the error and it will mostly correspond to a missing cpp header file
- Google the header file as is with ‘ubuntu’ as keyword and some packages will show up, look through those packages if they have the header file available, install them
- The once I had to install were clang, llvm, npm, nodejs, ghc, icu-devtools, libicu-dev, libblocksruntime-dev
- As always, if you find something still missing after above steps, keep looking and ask for help here, I’ll try my best to assist
- VSCode extensions that I suggest are ’ SourceKit-LSP for Visual Studio Code’ and ‘Swift Language’
If all goes well then it should look something like below
For Mac users: https://nshipster.com/vscode/
Almost similar steps and same advice
Please remember that these installation steps are to install swift with a language server to write swift code inside VSCode. This has nothing to do with the TF 2.0 alpha and those tutorails will not work locally. You can choose to pip update your tensorflow and see if swift talks nicely with it or not (that’s a TODO for me). VSCode will only help you write good swift code and you still have to compile it outside in the terminal, as I have shown, I couldn’t find a swift interpreter support for VSCode yet.
For those enthusiasts who want to try swift with TF, goto https://colab.research.google.com/github/tensorflow/swift/blob/master/notebooks/blank_swift.ipynb
Here you can write everything from scratch for practice and for inspiration read https://github.com/tensorflow/swift/tree/master/docs/site/tutorials
I hope above information was helpful for you, cheers