如何仅3行在Google Colab中使用VS Code(代码服务器)


安装软件包

1
!pip install colabcode

GitHub
https://github.com/abhishekkrthakur/colabcode/

启动colabcode

1
2
from colabcode import ColabCode
ColabCode(port=10000)

执行上述操作时,在Jupyte Notebook中将显示ngrok链接,而当您单击链接时,将显示VSCode(代码服务器)。

python

Screen Shot 2020-09-11 at 10.42.54 AM.png

之后,您可以打开一个终端并使用python test.py正常执行。
顺便说一句,您可以通过单击编辑器侧栏中的Gear图标轻松更改主题。

Screen Shot 2020-09-11 at 10.48.15 AM.png

nodejs

您也可以使用

nodejs。它的安装版本早于v8.11.3,但工作正常。
Screen Shot 2020-09-11 at 10.55.29 AM.png