Installation
============
Install Python 3.8
------------------
Get the Python-installer here: `https://www.python.org/downloads/ `_
Run the installation and make sure your user-environment-variables contain the path to your python-installation.
Check the successful installation by running
.. code-block:: bash
python --version
It should output `Python 3.8.10`.
Install the cyberglove package
------------------------------
It is recommended to install all packages into a virtual environment, as packages like numpy can take up significant disk space.
Navigate into the cyberglove folder (not :file:`cyberglove/cyberglove/`) and set the virtual environment up by running
.. code-block:: bash
python -m venv venv/
./venv/Scripts/activate
.. note::
If you get an error, it might be the problem that the `activate`-script is located in `./venv/bin/`.
For further information, please consider the `official venv documentation `_.
.. note::
If you get a warning that you are not allowed to run the activation-script, please enable script-execution on your system.
In the powershell, run
.. code-block:: bash
Set-ExecutionPolicy RemoteSigned
with administrator privileges.
This application uses pip as package-manager. Since Python 3.4, it is included by default with the Python binary installers.
Check if pip is installed by running
.. code-block:: bash
pip --version
.. note::
Please make sure you have the latest version of pip installed.
.. code-block::
pip install --upgrade pip
pip --version
Now, install the cyberglove-package:
.. code-block:: bash
python setup.py install
.. note::
If you wish to be able to edit the source-files, install the package by creating symlinks by running
.. code-block:: bash
python setup.py develop
instead.
Verify your installation by starting python and running
.. code-block:: python
import cyberglove
Install OpenSim 4.3
-------------------
.. note::
The OpenSim python-API was tested on Windows 10 64-bit only.
Head to the `OpenSim-website `_ and download OpenSim 4.3. After the download has finished, install the software.
Next, navigate to your installation-folder of OpenSim (in our case, this is :file:`C:/OpenSim 4.3`)
Step into :file:`sdk/Python`, and run
.. code-block:: bash
python setup_win_python38.py
This should output the installation folder of OpenSim with :file:`/bin` appended.
Now, add the displayed path to your system-variables (for both user and system):
.. figure:: env-variables.jpg
:align: center
:target: _images/env-variables.jpg
**Setting up environment-variables**
In the last step , install the OpenSim API:
Copy the folder :file:`Python` under :file:`sdk/` to your folder of the package cyberglove.
There, (:file:`cyberglove/Python/`) run
.. code-block:: bash
pip install .
This installs the opensim-package to your virtual environment.
After that, it is safe to delete the Python folder from your project.
.. note::
If you want to install the opensim package in your system, do not copy the :file:`Python`-folder and only run
.. code-block:: bash
pip install .
in there.