...
Tip |
---|
|
Before you can go on, you need to install Python: - Download Python 2.7.x from https://www.python.org/ (NOT Python 3!)
- Add the following directories to your
PATH environment variable:C:\Python27 C:\Python27\Scripts
Verify you can call python : Code Block |
---|
| C:\Users\Thomas>python --version
Python 2.7.5 |
- Install
pywin32 , an extension for WIndows. You will need it to interact with the TAP virtual interface - Install the Python setuptools from https://pypi.python.org/pypi/setuptools#installation-instructions. Typically, this means downloading a file called
ez_setup.py and double-clicking on it. Verify that you can call the easy_install command: Code Block |
---|
| C:\Users\Thomas>easy_install --version
setuptools 1.1.6 |
Install the pip utility: Code Block |
---|
| C:\Users\Thomas>easy_install pip |
Verify that you can call the pip command: Code Block |
---|
| C:\Users\Thomas>pip --version
pip 1.4.1 from c:\python27\lib\site-packages\pip-1.4.1-py2.7.egg (python 2.7) |
Install the OpenWSN Python dependencies (from the openwsn-sw\ directory on your Desktop): Code Block |
---|
| C:\Users\Thomas\Desktop\openwsn-sw> pip install -r requirements.pip |
Install SCons, the build environment: Code Block |
---|
| C:\Users\Thomas\Desktop\openwsn-sw> pip install scons |
|
Note |
---|
|
If you are using a 64-bit windows, you can use either 32-bit or 64-bit version of python. Just make sure it was consistent with pywin32 and minGW. That is saying if you choose to use 64-bit python, you also need to choose 64-bit pywin32 (there is 64-bit version pywin32 even it was called --win32) and 64-bit mingw. Likewise, 32-bit python, 32-bit pywin32 and mingw. Or unexpected error could happen. |
To compile the firmware as a Python extension module, type:
...