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

Creating your first Python virtual environment

Now that we have installed the Python toolset, let's take it for a test drive by creating a Python project that can interact with the AWS cloud platform. First, let's create a directory for the project and name it ObjectDetectionDemo. Within this directory, we initialize a Python 3 virtual environment with pipenv, as follows:

$ mkdir ObjectDetectionDemo
$ cd ObjectDetectionDemo
$ pipenv --three

After these commands, the ObjectDetectionDemo directory will contain a Pipfile. The Pipfile is a pipenv configuration file that specifies this project's Python packages and their dependencies.

Next, we specify and install the AWS Python SDK, Boto, for the ObjectDetectionDemo project:

$ pipenv install boto3

It might take a few minutes for Pipenv to synchronize with the Python package index and to install the boto3 package, along with its dependencies. After the installation, your Pipefile should have the following contents:

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
"boto3" = "*"

[requires]
python_version = "3.7"

As you can see here, boto3 has an entry under the packages section. Currently, the version number is listed as *, which means, use the latest version. You can replace * with a specific version for any of the packages for your project if necessary.

主站蜘蛛池模板: 富裕县| 郯城县| 栖霞市| 龙州县| 杭州市| 互助| 宝丰县| 桂林市| 恭城| 喀什市| 成武县| 叙永县| 河北区| 高青县| 曲水县| 枣强县| 长沙县| 建水县| 萨嘎县| 石泉县| 淳化县| 乌兰浩特市| 龙海市| 桐梓县| 揭阳市| 永顺县| 扬中市| 普陀区| 沽源县| 昌吉市| 三穗县| 瓦房店市| 治多县| 枣阳市| 卓资县| 仁怀市| 西乌珠穆沁旗| 竹溪县| 唐山市| 惠来县| 舒兰市|