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

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.

主站蜘蛛池模板: 兴海县| 阜南县| 陕西省| 泾源县| 苍溪县| 高邮市| 景泰县| 商南县| 海林市| 绥江县| 句容市| 石城县| 南华县| 彝良县| 苍梧县| 深水埗区| 甘谷县| 永嘉县| 广宗县| 光泽县| 江山市| 新建县| 鄂托克旗| 拉孜县| 璧山县| 永济市| 阜平县| 辽阳市| 中宁县| 理塘县| 金阳县| 蚌埠市| 崇明县| 昆山市| 霍林郭勒市| 泰顺县| 澜沧| 清水县| 阿拉善右旗| 玉屏| 潮州市|