BookmarkSubscribeRSS Feed

Installing Local Python Packages In SAS Viya

Started 13m ago by
Modified 13m ago by
Views 2

Screenshot 2026-11-24 at 12.49.56 pm.png

 

A recent enhancement to the Python - Create a Virtual Environment custom step enables users to install local Python wheels (`.whl`) files  in virtual environments, giving them an easy, convenient and safe mechanism to rapidly innovate and test new analytics solutions. 

 

SAS Viya's Open Source Configurator gives administrators control over Python (and R) packages exposed to users.  However, control should not stifle freedom.  Virtual environments are the happy medium to help users quickly experiment with new or additional packages.  The Python - Create a Virtual Environment SAS Studio Custom Step is an established tool to quickly stand up virtual Python environments and add packages from standard registries such as PyPi.  

 

Users benefit due to rapid development with the right amount of isolation. Their environment configuration does not affect other users.

 

Our recent enhancement helps users also install local packages from `.whl` (wheel) files located on the SAS server.  This removes dependency on hosted on external registries such as PyPi.  Users can also experiment with different versions (earlier or later) of a Python package already available to their SAS Viya environment.  The ephemeral nature of Python virtual environments isolates the installation to only the current SAS Studio session (with an option to persist the virtual environment (venv) configuration if required), thus providing a safe pattern and a sandbox.

 

Enterprises may not intend to make their packages, especially those under development, available on public registries and may work on multiple branches and versions of a package.  Virtual environments with the capability to install local wheels facilitate this development pattern.

 

Watch the below video for a quick example of the enhanced custom step.  Notice, also, the convenience offered by being able to persist the environment definition (thus not needing to reinstall packages) and installing a mix of public packages along with local packages.

 

For further details, refer the documentation page for Python - Create a Virtual Environment.

Download and use the SAS Studio Custom Step from this folder. 

If you're new to custom steps, read about them here.

 

Try it out and let me know your comments, either using the comments section below, or, if you prefer, a quick email to [email protected].

 

 

 

Contributors
Version history
Last update:
13m ago
Updated by:

Viya Copilot Motion Graphic.gifViya Copilot Motion Graphic

Ready to see what SAS Viya Copilot can do?

Visit the Tips & Tricks page for setup guidance, demos, and practical examples that show how Copilot supports your workflows.

Get Started →

SAS AI and Machine Learning Courses

The rapid growth of AI technologies is driving an AI skills gap and demand for AI talent. Ready to grow your AI literacy? SAS offers free ways to get started for beginners, business leaders, and analytics professionals of all skill levels. Your future self will thank you.

Get started

Article Tags