【发布时间】:2019-10-07 14:46:06
【问题描述】:
我在 Google 云上运行 Debian VM (4.9.189-3+deb9u1)。我想在这个实例上运行一个脚本;该脚本在我的本地机器上运行良好(Mac OSX Mojave 10.14.6;python 3.6.8)。但是,当我在 VM 上运行它时,我收到一个错误,这似乎与我的 VM 在脚本需要 python 3.6+ 时运行 python 3.4 的事实有关。
这就是问题所在。当我运行python -V 时,响应为Python 3.7.4。但是,当我尝试安装支持我要运行的脚本的库时
pip3 install --user --upgrade -e
git+https://github.com/twintproject/twint.git@origin/master#egg=twint
我明白了
twint requires Python '>=3.6.0' but the running Python is 3.5.3。
我试过changing the default python as detailed here;这似乎不起作用——事实上,当我查询ls /usr/bin/python* 时,python 3.6 甚至作为一个选项都不可见。任何人都可以就如何在此处进行操作提供一些建议吗?谢谢。
【问题讨论】:
标签: python-3.x google-cloud-platform virtual-machine debian-based