【问题标题】:Python 3.6 is required. Current python version is ''需要 Python 3.6。当前的python版本是''
【发布时间】:2018-08-29 21:45:29
【问题描述】:

我正在尝试在 Ubuntu 上使用 azure 函数并出现以下错误:

需要 Python 3.6。当前的python版本是''

我使用以下方式安装了 azure 函数工具:

npm i -g azure-functions-core-tools@core --unsafe-perm true

并尝试:

func init --worker-runtime python

知道为什么会失败吗? 谢谢, 阿德里安

【问题讨论】:

    标签: azure-functions-core-tools


    【解决方案1】:

    根据sudo apt list --installed|grep python3.6 所说的,您可能希望通过sudo apt-get install python3.6 安装python3.6。

    【讨论】:

    • 这是命令的输出:libpython3.6/bionic,now 3.6.5-3 amd64 [installed] libpython3.6-dev/bionic,now 3.6.5-3 amd64 [installed,自动] libpython3.6-minimal/bionic,现在 3.6.5-3 amd64 [已安装] libpython3.6-stdlib/bionic,现在 3.6.5-3 amd64 [已安装] python3.6/bionic,现在 3.6.5-3 amd64 [已安装] python3.6-dev/bionic,现在 3.6.5-3 amd64 [已安装,自动] python3.6-minimal/bionic,现在 3.6.5-3 amd64 [已安装]
    • 我认为问题与 nodejs 尝试使用一些 azure 实用程序运行 python --version 有关。我正在按照这里的步骤操作:github.com/Azure/azure-functions-python-worker/wiki/…。 python --version 返回 3.6.5 所以 python 应该没有问题。也许我缺少一些权限或其他东西
    • 我想知道你的PYTHONPATH 是怎么说的。您可能将不同版本的 Python 设置为默认值...
    • 默认python是2.7。我在调用 func init 之前使用 source /bin/activate,如上面链接中所述
    猜你喜欢
    • 2019-04-27
    • 2015-11-21
    • 2014-08-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-02
    • 1970-01-01
    • 2016-12-28
    相关资源
    最近更新 更多