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

How it works...

The preceding pipenv example shows the developer changing to the desired directory for the project, and then invoking pipenv to simultaneously create the virtual environment, activate it, and install the desired module.

In addition to creating the virtual environment, once you have created your Python program, you can run the program using pipenv as well:

>>> pipenv run python3 <program_name>.py

Doing this ensures all installed packages in the virtual environment are available to your program, thus reducing the likelihood of unexpected errors.

When launching a pipenv shell, a new virtual environment is created, with indications of where the environment is created in the file system. In this case, two environment executables are created, referencing both the Python 3.6 command and the default Python command. (Depending on the systems, these may actually reference different versions of Python. For example, the default Python command may call the Python 2.7 environment instead of Python 3.6.)

主站蜘蛛池模板: 天津市| 兴宁市| 永宁县| 丹阳市| 嘉峪关市| 新乡县| 巴彦淖尔市| 恩施市| 攀枝花市| 桂东县| 来安县| 宁夏| 随州市| 赤峰市| 上犹县| 金堂县| 黎城县| 信丰县| 桓台县| 奇台县| 阜阳市| 吉林省| 疏勒县| 黔西| 嵊州市| 兖州市| 临沂市| 凤凰县| 盱眙县| 肃南| 大冶市| 洛宁县| 普陀区| 辛集市| 洱源县| 攀枝花市| 东至县| 汉寿县| 江源县| 观塘区| 萨嘎县|