问题描述
我在 vscode 中创建了一个虚拟环境并激活了它,但是,虚拟环境没有显示在 python 解释器路径中.只显示默认的 python 路径.此外,当我尝试在 venv 处于活动状态时在终端中安装任何模块时,它仅显示无法使用"创建进程.安装模块.请帮我解决这个问题.
I have created a virtual environment in vscode and also activated it, however, the virtual environment is not being shown in python interpreter path. only the default python path is being shown. Also when I am trying to install any module in terminal while the venv active, it just shows that Unable to create process using "" install module. Please help me with this problem.
以下是我用来创建虚拟环境的步骤:
Here are the steps which I used to create the virtual environment:
- 我使用命令pip install virtualenv"安装了 virtualenv 模块
- 我使用命令virtualenv myprojectenv"在文件夹中创建了虚拟环境
- 然后我使用命令'.\myprojectenv\Scripts\activate.ps1'激活了虚拟环境
- 这让我进入了虚拟环境.然后我尝试使用命令pip install flask"安装模块flask",但随后显示错误-无法使用"创建进程.'
由于我是编码领域的初学者,还请提供一个外行语言的解决方案
Also please provide me a solution in layman's language as I am a beginner in the coding field
推荐答案
安装flask在终端写代码:-py -m pip 安装烧瓶
to install flask write the code in the terminal:-py -m pip install flask
在 Virtual Studio Code 中运行此代码时,这 5 个包将与 Flask 一起自动安装.
On running this code in Virtual Studio Code, these 5 packages will be installed automatically along with flask.
- Werkzeug
- 它很危险
- 点击
- 金贾
- 标记安全
这篇关于python解释器无法识别虚拟环境的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!