gpt4 book ai didi

python3 -m venv : how to specify Python point release/version?

转载 作者:行者123 更新时间:2023-12-04 13:20:00 24 4
gpt4 key购买 nike

使用 virtualenv 创建虚拟环境您可以像这样指定 Python 版本和点版本:

virtualenv --python=python3.6 .venv

我如何使用 Python3 的 venv 来实现这一点模块(如 python3 -m venv .newvenv )? According to the documentation使用 venv是创建虚拟环境的推荐方法,但我没有看到如何选择具有特定 Python 版本的虚拟环境。

最佳答案

运行 venv使用您想要用于新虚拟环境的任何 Python 安装。例如,如果您使用 python3.6 运行 Python 3.6 安装。 , 然后

python3.6 -m venv whatever

将是您创建 Python 3.6 虚拟环境的方式。

关于python3 -m venv : how to specify Python point release/version?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54700307/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com