官术网_书友最值得收藏!

How to do it...

  1. The original, normal way to create a virtual environment comprises three separate steps. First, the virtual environment is created:
      >>> python3 -m venv <dir_name>
  1. Next, the virtual environment is activated so it can be used:
      >>> source <dir_name>/bin/activate
  1. Finally, pip is used to install the necessary module:
      >>> pip install <module>
  1. To make this process easier, pipenv combines the pip and venv calls, so first we have to move to the desired directory where the virtual environment will be placed:
      >>> cd <project_name>
  1. Next, we simply call pipenv to create the environment and install the desired module:
      >>> pipenv install <module>
  1. Use pipenv to call the shell command and wait for the shell to be created. Observe that a virtual environment has been created and the command prompt is now activated within the environment. The following screenshot includes the commands from the previous steps, for clarity:

主站蜘蛛池模板: 塔河县| 玛沁县| 土默特右旗| 镇赉县| 彩票| 阳原县| 南郑县| 隆化县| 六安市| 金湖县| 正定县| 罗平县| 苍南县| 岐山县| 商河县| 六枝特区| 荔浦县| 灵寿县| 宁波市| 海口市| 石景山区| 西峡县| 黔南| 台州市| 荔浦县| 南乐县| 凯里市| 五大连池市| 胶南市| 安徽省| 吉林市| 文化| 沭阳县| 安义县| 溆浦县| 翁源县| 新密市| 江津市| 甘洛县| 宝兴县| 株洲县|