<< The power of calling Python from Nelson Python engine pyargs >>

How to install python package


Description


Nelson allows users to seamlessly integrate Python packages into their workflows.

Installing Python packages within Nelson expands its functionality and enables users to leverage a wide array of libraries for data analysis, machine learning, scientific computing, and more.

This help file provides a comprehensive guide on installing Python packages from within Nelson.

Tips and Considerations:

- Package Availability: Ensure that the Python package you intend to install is available on the Python Package Index (PyPI) or another compatible repository.

- Dependencies: Some Python packages may have dependencies on other packages. Make sure to install any required dependencies beforehand.

- Version Compatibility: Check the compatibility of the package with your current Python environment and Nelson version to avoid compatibility issues.

- Virtual Environments: Consider using virtual environments within Nelson to isolate package installations and manage dependencies for different projects.

- Permission Rights: When installing packages that require write access to the Python directory, ensure that you have the necessary permissions. On some systems, administrative privileges may be required to install packages globally. If you encounter permission errors, consider using a virtual environment or contacting your system administrator for assistance.

Examples


Get info from the pyenv environment:

pe = pyenv

Construct the command to install the package:

package_to_install = "scipy";
command_to_install = '"' + pe.Executable +  '"' + " -m pip install " + package_to_install;

Construct the command to install the package:

[status, msg] = system(command_to_install);

See also


system, pyenv.

<< The power of calling Python from Nelson Python engine pyargs >>