python -m pip install path/to/nelson/modules/python_engine/resources/python
python -m pip install --no-build-isolation path/to/nelson/modules/python_engine/resources/python
python -m pip install -e path/to/nelson/modules/python_engine/resources/python
The Nelson Engine API for Python is distributed as a Python package named nelson. It provides nelson.engine and the Nelson-compatible Python array classes.
Install the package into the Python environment that will call Nelson. From a Nelson source or build tree, the package directory is modules/python_engine/resources/python.
The Python package contains the Python API only. The native Nelson engine library must still be available from a Nelson installation or build output. If automatic discovery fails, set NELSON_ROOT to the Nelson root directory, or set NELSON_ENGINE_LIBRARY to the full path of the engine library.
On Windows build trees, the engine library is commonly bin/x64/libnlsEngine.dll. On Linux it is commonly libnlsEngine.so, and on macOS it is commonly libnlsEngine.dylib.
Optional packages such as NumPy and pandas are not required to import the engine package, but they enable higher fidelity conversion for arrays and tables.
If the Python environment has no network access during installation, first ensure that setuptools and wheel are already installed, then use --no-build-isolation so pip does not try to download build dependencies into a temporary build environment.
cd D:\Developpements\Github\nelson-lang\nelson
python -m pip install .\modules\python_engine\resources\python
cd D:\Developpements\Github\nelson-lang\nelson
python -m pip install -e .\modules\python_engine\resources\python
python -m pip install setuptools wheel
cd D:\Developpements\Github\nelson-lang\nelson
python -m pip install --no-build-isolation .\modules\python_engine\resources\python
$env:NELSON_ROOT = "D:\Developpements\Github\nelson-lang\nelson"
python -c "import nelson.engine; eng = nelson.engine.start_nelson(); print(eng.sqrt(4.0)); eng.quit()"
$env:NELSON_ENGINE_LIBRARY = "D:\Developpements\Github\nelson-lang\nelson\bin\x64\libnlsEngine.dll"
python -c "import nelson.engine; eng = nelson.engine.start_nelson(); print(eng.sqrt(4.0)); eng.quit()"
python -m pip install /path/to/nelson/modules/python_engine/resources/python
export NELSON_ROOT=/path/to/nelson
python -c "import nelson.engine; eng = nelson.engine.start_nelson(); print(eng.sqrt(4.0)); eng.quit()"
python -m pip install numpy pandas
| Version | Description |
|---|---|
| 2.0.0 | Nelson Engine API for Python installation help added. |