使用python创建Pipenv

问题描述 投票:0回答:1

是否有一种使用python代码和命令行脚本创建虚拟环境的方法。如果有人可以帮助,那将是很大的帮助

python pipenv virtual-environment
1个回答
0
投票

从命令行使用python 3+安装virtualenv:

1.  sudo apt-get install python3-pip (installs and update pip version)

2.  pip3 install virtualenv (may not require 'sudo' depending on privileges setup on your system)

3.  virtualenv venv (venv can be any name that's your project name for the virutal environment)

4.  source venv/bin/activate (activate the virutalenv) 

5.  deactivate (to stop running the virtual environment)

6. To delete virtualenv: rm -rf venv

OR ...您也可以使用Python 3这样安装:

virtualenv -p python3 myenv (myenv can be anything again)

希望这会有所帮助,其中有许多教程可以指导您:)

© www.soinside.com 2019 - 2024. All rights reserved.