Skip to content
Snippets Groups Projects
sdk_developers.md 2.06 KiB
Newer Older
Daniel García's avatar
Daniel García committed

Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed
# OpenCAPIF SDK Development Environment Installation
Daniel García's avatar
Daniel García committed

Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed
Currently, the OpenCAPIF SDK is only available by downloading this repository and performing a manual installation. In the future, an OpenCAPIF SDK package will be released for easier installation.
Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed
Before proceeding, ensure you have fulfilled the necessary [requirements](../README.md).
Daniel García's avatar
Daniel García committed

Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed
Follow the steps below to install the OpenCAPIF SDK for development purposes:
Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed
## Prerequisites
Daniel García's avatar
Daniel García committed

Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed
- Developers must have the following tools installed:
  - **pyenv**

## Installation Steps

### 1. Set Up a Python Environment with `pyenv`

Follow these steps to create and activate a virtual environment using `pyenv`:

```bash
# Install Python 3.12 using pyenv
Daniel García's avatar
Daniel García committed
pyenv install 3.12
Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed

# Create a virtual environment for the SDK
Daniel García's avatar
Daniel García committed
pyenv virtualenv 3.12 pesp_sdk_env
Jorge Echevarria Uribarri's avatar
Jorge Echevarria Uribarri committed

# Activate the virtual environment
JorgeEcheva26's avatar
JorgeEcheva26 committed
source path/to/.pyenv/versions/pesp_sdk_env/bin/activate
Daniel García's avatar
Daniel García committed
```

OPTIONAL step: sometimes Apple Mac shells raise issues while finding the shell path. If this happens, try this command:

JorgeEcheva26's avatar
JorgeEcheva26 committed
    ```console
    export PATH="$HOME/.pyenv/bin:$PATH"
    eval "$(pyenv init --path)"
    eval "$(pyenv init -)"
    eval "$(pyenv virtualenv-init -)"
    ```
OPTIONAL step: For Arm64 architecture sometimes will appear this problem 

    ```Last 10 log lines:
        __locale_localeconv in _localemodule.o
        __locale_localeconv in _localemodule.o
        __locale_localeconv in _localemodule.o
        __locale_localeconv in _localemodule.o
    "_libintl_textdomain", referenced from:
        __locale_textdomain in _localemodule.o
    ld: symbol(s) not found for architecture arm64
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    make: *** [Programs/_freeze_module] Error 1
    make: *** Waiting for unfinished jobs....´´´


JorgeEcheva26's avatar
JorgeEcheva26 committed
This article explains how to solve it [here](https://laict.medium.com/install-python-on-macos-11-m1-apple-silicon-using-pyenv-12e0729427a9)  
JorgeEcheva26's avatar
JorgeEcheva26 committed

JorgeEcheva26's avatar
JorgeEcheva26 committed


JorgeEcheva26's avatar
JorgeEcheva26 committed
2. Install the opencapif_sdk with pip in the environment:
Daniel García's avatar
Daniel García committed

```console
JorgeEcheva26's avatar
JorgeEcheva26 committed
pip install opencapif_sdk
Daniel García's avatar
Daniel García committed
```

**Congratulations!** The installation of OpenCAPIF SDK has finished.