我有一个google colab文件,我想在Visual Studio Code中运行。正常细胞运行正常,但我有以下细胞:
# 1. Downloads, extracts, and sets the permissions for the Elasticsearch installation image:
%%bash
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.9.2-linux-x86_64.tar.gz -q
tar -xzf elasticsearch-7.9.2-linux-x86_64.tar.gz
chown -R daemon:daemon elasticsearch-7.9.2
问题是我在wget
上获取SyntaxError: invalid syntax
我已经尝试了多种解决方案从stackoverflow
1.使用我在Google Colab中使用的通用%%bash
。
1.使用%%shell
1.使用1的较长版本%%script bash
1.使用%%script
bash
1.使用快捷方式%%!
我使用了像this,this这样的源代码。This是我使用的教程
1条答案
按热度按时间vawmfj5a1#
好吧我自己找到解决办法了
这是正确的语法