BookmarkSubscribeRSS Feed
Mena11
Calcite | Level 5

Hi everyone,

I open the following track to ask for clarifications on the configuration of the node "Open source code" in SASModelStudio in Viya 3.5
In particular, I was wondering if it was possible to set the use of a specific virtualenv (in Python) based on the type of user.


At the beginning of the user session it would be necessary to invoke the command "source bin/activate" of a certain venv.

 

[user1@machine /home/user1/venv]# source bin/activate
(venv) [user1@machine /home/user1/venv]#


If it wasn't possible to discriminate by user/group, could it be possible to set a default venv in some configuration file?

 

Thanks

Davide

2 REPLIES 2
RadhikhaMyneni
SAS Employee

Hello, 

Currently there is no way to invoke a python virtual environment from the Open Source Code (OSC) node because the node just calls the python executable it finds (mostly in PATH) and invokes its base environment. 

 

You can update the PATH by modifying the sas-compsrv file under the /opt/sas/viya/config/etc/sysconfig/compsrv/default directory by adding the following line:
export PATH=path_to_your_python_bin_directory:${PATH}

 

Radhikha

Mena11
Calcite | Level 5

Hi Radhikha,

thank you for the response. Do you think will be it available in the future or isn't it in the roadmap to add this feature?

 

Thanks

Davide

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to choose a machine learning algorithm

Use this tutorial as a handy guide to weigh the pros and cons of these commonly used machine learning algorithms.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1258 views
  • 0 likes
  • 2 in conversation