简体   繁体   English

找不到标准 Python 'venv' 模块

[英]Standard Python 'venv' module not found

I am trying to create two virtual environments through Pycharm IDE.我正在尝试通过 Pycharm IDE 创建两个虚拟环境。

  • one for Python 2.7一个用于 Python 2.7
  • one for Python 3.8一个用于 Python 3.8

However, I was able to create venv for 2.7 but could not succeed with 3.8;但是,我能够为 2.7 创建 venv 但无法在 3.8 上成功; and end-up with "Error: Standard Python 'venv' module not found".并以“错误:找不到标准 Python 'venv' 模块”结束。 as per [this reference] https://docs.python.org/3.7/installing/index.html ) venv is already part of python3.8.根据 [this reference] https://docs.python.org/3.7/installing/index.html )venv 已经是 python3.8 的一部分。

设置错误

So, It would great if someone help me with my following questions.因此,如果有人帮助我解决以下问题,那就太好了。

  • Is it possible to setup two venv's with two different version of python?是否可以使用两个不同版本的 python 设置两个 venv?
  • How do i know if my python3.8 has venv module?我怎么知道我的 python3.8 是否有 venv 模块?
  • How can i install venv to python3.8 to be able to configure virtual environment in Pycharm?我如何将venv安装到python3.8才能在Pycharm中配置虚拟环境?

I was able to fix this problem after installing the python 3.8 with executable installer.使用可执行安装程序安装 python 3.8 后,我能够解决此问题。 previously I got "Standard Python 'venv' module not found" problem because I have installed python 3.8 as embeddable zip file.之前我遇到了“找不到标准 Python 'venv' 模块”的问题,因为我已经安装了 python 3.8 作为可嵌入的 zip 文件。

download the executable installer not the embeddable zip file下载可执行安装程序而不是可嵌入的 zip 文件绿色可执行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM