无法通过bash提示符在python中导入包 [英] Unable to import package in python through bash prompt

查看:91
本文介绍了无法通过bash提示符在python中导入包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用bash提示符在azure中导入azure.functions。我安装了包但我无法导入它。请帮我解决这个问题。

I am trying to import azure.functions in azure using bash prompt. I installed the package but I am unable to import it. Please do help me resolve the issue.

推荐答案

您好Ajinkya2210,

Hi Ajinkya2210,

目前,Azure Functions仅支持Python 3.6.x(官方CPython发行版)。

Currently, Azure Functions only supports Python 3.6.x (official CPython distribution).

本地开发并测试Python函数,您必须在Python 3.6环境中工作。运行以下命令以创建和激活名为  .env的虚拟环境。

To locally develop and test Python functions, you must work in a Python 3.6 environment. Run the following commands to create and activate a virtual environment named .env.

Bash或终端窗口:

Bash or a terminal window:

python3.6 -m venv .env

来源.env / bin / activate

有关详细信息,请参阅" Python版本和包管理"和"创建
函数 - Python
"。

For more details, refer "Python version and package management" and "Create function- Python".

希望这会有所帮助。


这篇关于无法通过bash提示符在python中导入包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆