You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/python-devbox-setup.md
+18-15Lines changed: 18 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
This document describes how to prepare your development environment to use the *Microsoft Azure IoT SDKs for Python*.
4
4
5
5
-[Setup your development environment](#devenv)
6
-
-[Install on Windows using PyPI wheels](#windows-wheels)
6
+
-[Install the Python modules using PyPI wheels](#pypi-wheels)
7
7
-[Build the samples on Linux](#linux)
8
8
-[Build the samples on Mac](#mac)
9
9
-[Build the samples on Windows using nuget packages](#windows)
@@ -17,16 +17,19 @@ Ensure that the desired Python version is installed (2.7.x, 3.4.x or 3.5.x). Run
17
17
* On Linux, Python 2.7 is typically already installed and active.
18
18
* On Windows, install the latest x86 or x64 Python 2.7 or 3.x client from ([python.org](https://www.python.org/downloads/)). If you plan to build the Python library, the scrips will need a valid Python.exe in the path. Based on the active Python version (e.g. Python 2.7.11 x86 32bit) the build script choses the compiler settings for the Python extension module build accordingly and copies the extension to the test and sample folders.
19
19
20
-
<aname="windows-wheels"></a>
21
-
## Install the Python modules on Windows from [PyPI]
20
+
<aname="pypi-wheels"></a>
21
+
## Install the Python modules using PyPI wheels from [PyPI]
22
22
23
-
1. Open a command-prompt window.
23
+
1. Open a command-prompt (Windows) or console (other platforms) window.
24
24
2. To install the Azure IoT Hub device client module (**iothub\_client** package), type the following command: `pip install azure-iothub-device-client`
25
-
2. To install the Azure IoT Hub service client module (**iothub\_service\_client** package), type the following command: `pip install azure-iothub-service-client`
26
-
3. Make sure the Visual C++ Redistributable for Visual Studio 2015 package is installed from here: https://www.microsoft.com/en-us/download/details.aspx?id=48145 (Note: Visual Studio 2015 installation includes it)
25
+
3. To install the Azure IoT Hub service client module (**iothub\_service\_client** package), type the following command: `pip install azure-iothub-service-client`
27
26
4. Now Python is ready to run your application.
28
27
29
-
> Note: If Pip cannot install the package for the specific version of Python installed on your machine, use one of the following options to build the **iothub_client** module.
28
+
> Notes:
29
+
> - Supported platforms: Windows, Linux (Ubuntu), Raspberry Pi
30
+
> - On Windows make sure the Visual C++ Redistributable for Visual Studio 2015 package is installed from here: https://www.microsoft.com/en-us/download/details.aspx?id=48145 (Note: Visual Studio 2015 installation includes it)
31
+
> - On other platforms make sure the Pip tool is upgraded to the latest version. (> 9)
32
+
> - If Pip cannot install the package for the specific version of Python installed on your machine, use one of the following options to build the **iothub_client** module.
30
33
31
34
<aname="linux"></a>
32
35
## Build the Azure IoT Hub SDKs for Python on Linux
@@ -55,16 +58,16 @@ In order to setup your development environment to build the C binaries make sure
55
58
> For information about how to upgrade your version of gcc on Ubuntu 14.04, read [How do I use the latest GCC 4.9 on Ubuntu 14.04?](http://askubuntu.com/questions/466651/how-do-i-use-the-latest-gcc-4-9-on-ubuntu-14-04).
56
59
57
60
### Compile the Python modules
58
-
The Python iothub_client and iothub_service_client modules support python versions 2.7.x, 3.4.xor 3.5.x. Know the appropriate version you would like to build the library with for the following instructions.
61
+
The Python iothub_client and iothub_service_client modules support python versions 2.7.x, 3.4.x, 3.5.x or 3.6.x. Know the appropriate version you would like to build the library with for the following instructions.
59
62
60
-
1. Ensure that the desired Python version (2.7.x, 3.4or 3.5.x) is installed and active. Run `python --version` or `python3 --version` at the command line to check the version.
63
+
1. Ensure that the desired Python version (2.7.x, 3.4.x, 3.5.x or 3.6.x) is installed and active. Run `python --version` or `python3 --version` at the command line to check the version.
61
64
2. Open a shell and navigate to the folder **build_all/linux** in your local copy of the repository.
62
65
3. Run the `./setup.sh` script to install the prerequisite packages and the dependent libraries.
63
66
* Setup will default to python 2.7
64
-
* To setup dependencies for python 3.4 or 3.5, run `./setup.sh --python-version 3.4` or `./setup.sh --python-version 3.5` respectively
67
+
* To setup dependencies for python version greater than 3, run `./setup.sh --python-version X.Y` where "X.Y" is the pythonversion (e.g. 3.4, 3.5 or 3.6)
65
68
4. Run the `./build.sh` script.
66
69
* Build will default to python 2.7
67
-
* To build with python 3.4 or 3.5, run `./build.sh --build-python 3.4` or `./build.sh --build-python 3.5` respectively
70
+
* To build with python version greater than 3, run `./build.sh --build-python X.X` where "X.Y" is the python version (e.g. 3.4, 3.5 or 3.6)
68
71
5. After a successful build, the `iothub_client.so` Python extension module is copied to the [**device/samples**][device-samples] and [**service/samples**][service-samples] folders. Visit these folders for instructions on how to run the samples.
69
72
70
73
###Known build issues:
@@ -87,16 +90,16 @@ In order to setup your development environment to build the C binaries, you need
87
90
* On Mac OS you will need XCode and install the Commandline Utils
88
91
89
92
### Compile the Python modules
90
-
The Python iothub_client and iothub_service_client modules support python versions 2.7.x, 3.4.xor 3.5.x. Know the appropriate version you would like to build the library with for the following instructions.
93
+
The Python iothub_client and iothub_service_client modules support python versions 2.7.x, 3.4.x, 3.5.x or 3.6.x. Know the appropriate version you would like to build the library with for the following instructions.
91
94
92
-
1. Ensure that the desired Python version (2.7.x, 3.4or 3.5.x) is installed and active. Run `python --version` or `python3 --version` at the command line to check the version.
95
+
1. Ensure that the desired Python version (2.7.x, 3.4.x, 3.5.x or 3.6.x) is installed and active. Run `python --version` or `python3 --version` at the command line to check the version.
93
96
2. Open a shell and navigate to the folder **build_all/mac** in your local copy of the repository.
94
97
3. Run the `./setup.sh` script to install the prerequisite packages and the dependent libraries.
95
98
* Setup will default to python 2.7
96
-
* To setup dependencies for python 3.4 or 3.5, run `./setup.sh --python-version 3.4` or `./setup.sh --python-version 3.5` respectively
99
+
* To setup dependencies for python version greater than 3, run `./setup.sh --python-version X.Y` where "X.Y" is the pythonversion (e.g. 3.4, 3.5 or 3.6)
97
100
4. Run the `./build.sh` script.
98
101
* Build will default to python 2.7
99
-
* To build with python 3.4 or 3.5, run `./build.sh --build-python 3.4` or `./build.sh --build-python 3.5` respectively
102
+
* To build with python version greater than 3, run `./build.sh --build-python X.X` where "X.Y" is the python version (e.g. 3.4, 3.5 or 3.6)
100
103
5. After a successful build, the `iothub_client.so` Python extension module is copied to the [**device/samples**][device-samples] and [**service/samples**][service-samples] folders. Visit these folders for instructions on how to run the samples.
0 commit comments