|
|
Line 17: |
Line 17: |
|
| |
|
| <div class="phd-slide"> | | <div class="phd-slide"> |
| <h2>Requirements</h2> | | <h2>Installing the Phidget Python Module</h2> |
|
| |
|
| <p>First, make sure you have the following installed:</p> | | <p>First, install <span>[https://www.python.org/downloads/ Python3]</span> if you haven't already.</p> |
| | |
| <p>● Phidgets Drivers for Windows (see Part 1 of this user guide)</p>
| |
| | |
| <p>● <span>[https://www.python.org/downloads/ Python]</span> (2.7 and 3.6+ are both compatible with Phidgets)</p>
| |
| </div>
| |
| | |
| <div class="phd-slide">
| |
| <h2>Installing the Phidget Python Module</h2>
| |
|
| |
|
| <p> | | <p> |
| Python versions 2.7.9+ and 3.4+ include PIP by default. To install the Phidget22 Python module with PIP, simply open the <b>Command Prompt</b> (press the | | Python 3.4+ includes PIP by default. To install the Phidget22 Python module with PIP, simply open the <b>Command Prompt</b> (press the Windows key and search |
| Windows key and search for <b>cmd</b>), and enter the command: | | for <b>cmd</b>), and enter the command: |
| </p> | | </p> |
|
| |
|
| <div class="phd-command-line"><code>python -m pip install Phidget22</code></div> | | <div class="phd-command-line"><code>python -m pip install Phidget22</code></div> |
|
| |
| <p>
| |
| To install the Phidget22 libraries to a specific Python version, you can use the <b>Python Windows Launcher</b> from the Command Prompt as follows (replace
| |
| <b>-X.X</b> with your Python version, e.g. -2.7 or -3.6):
| |
| </p>
| |
|
| |
| <div class="phd-command-line"><code>py -X.X -m pip install Phidget22</code></div>
| |
|
| |
| <p>If you don't use PIP, follow the manual installation instructions on the next slide.</p>
| |
| </div>
| |
|
| |
| <div class="phd-slide">
| |
| <h2>Installing the Phidget Python Module</h2>
| |
|
| |
| <p>To install the Phidget22 Python module without PIP, you need to download it here:</p>
| |
|
| |
| <p>● <span>[https://www.phidgets.com/downloads/phidget22/libraries/any/Phidget22Python.zip Phidget22 Python Module]</span></p>
| |
|
| |
| <p>
| |
| Unpack the Phidget22 Python module and open the Command Prompt (press the Windows key and search for <b>cmd</b>). Find the folder where you downloaded the
| |
| Python module and enter this command:
| |
| </p>
| |
|
| |
| <div class="phd-command-line"><code>python setup.py install</code></div>
| |
|
| |
| <p>This will build the module and install the Python module files into your site-packages directory.</p>
| |
|
| |
| <div class="phd-lazy-image" data-src="https://www.phidgets.com/decks/PT3_PYTHON_WIN_CMD/-x180/50/Python_install.png"></div>
| |
| </div> | | </div> |
|
| |
|