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

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 1095 views
  • 0 likes
  • 2 in conversation