Hi,
Can anybody help me with the procedure to install python packages in SAS Viya4?
I want to use packages like tabula, PyPDF2 to extract information from PDF. But, these packages are not inbuilt in python. So, I have to install these packages manually. But, I don't know how to install it on python that is integrated on SAS VIYA 4. We have python version 3.8 on SAS Viya4
Thanks in advance for the help
actually the answer is in one of the previous exchanges.
If you followed this article to enable Python in your SAS Viya :
https://communities.sas.com/t5/SAS-Communities-Library/Configuring-SAS-Viya-for-Python-Integration/t...
This is also the way to add extra Python packages.
By using the SAS Configurator for Open Source you can install extra packages .
You just add your Python package to this line in your $deploy/site-config/sas-pyconfig/change-configuration.yaml
- op: replace # Packages that will be installed by PIP.
path: /data/default_py.pip_install_packages
value: "sas_kernel matplotlib sasoptpy sas-esppy NeuralProphet scipy rpy2 Flask XGBoost TensorFlow pybase64 scikit-learn statsmodels sympy mlxtend Skl2onnx nbeats-pytorch ESRNN onnxruntime opencv-python zipfile38 json2 pyenchant nltk spacy gensim"
Regenerate your manifest file (site.yaml) and re-apply it.
If you launch a new instance of the sas-pyconfig job, this will add the extra packages
Hope this helps
No, we haven't installed SWAT. But Python is installed.
We have followed this link to configure python in SAS Viya4 environment.
Now, we want to know how we can install additional python packages like - tabula and pypdf2. We need this in order to process pdf files.
Please find the screen shots of the packages that we have installed in the attached file and please guide us how we can install the above mentioned packages.
Hi,
I didn't get a solution to install the python packages- tabula and pypdf2. Please help me with a solution
actually the answer is in one of the previous exchanges.
If you followed this article to enable Python in your SAS Viya :
https://communities.sas.com/t5/SAS-Communities-Library/Configuring-SAS-Viya-for-Python-Integration/t...
This is also the way to add extra Python packages.
By using the SAS Configurator for Open Source you can install extra packages .
You just add your Python package to this line in your $deploy/site-config/sas-pyconfig/change-configuration.yaml
- op: replace # Packages that will be installed by PIP.
path: /data/default_py.pip_install_packages
value: "sas_kernel matplotlib sasoptpy sas-esppy NeuralProphet scipy rpy2 Flask XGBoost TensorFlow pybase64 scikit-learn statsmodels sympy mlxtend Skl2onnx nbeats-pytorch ESRNN onnxruntime opencv-python zipfile38 json2 pyenchant nltk spacy gensim"
Regenerate your manifest file (site.yaml) and re-apply it.
If you launch a new instance of the sas-pyconfig job, this will add the extra packages
Hope this helps
I'd suggest opening a Tech Support track for this is your best option if you haven't already. I'm also moving this post to the Administration category for better visibility.
Since SAS Viya 4 comes in the shape of container images, they are not supposed to be modified.
The best option is to configure your SAS Viya 4 Python installation to point to a shared location on your Persistent Volume(s), where your modules will be installed and collected/pointed from the Python installation. If you manage to do this, you are good to go.
Else and technically speaking, you can modify the SAS images before deployed, but mind that, as soon as you, your SAS installation will not officially/fully supported anymore. Hence the reason why, while technically you can do this, it is not a healthy alternative. This is just one of the reasons. Another reason is the fact that, for every maintenance/update of SAS Viya, you would need to take the same steps to modify the image.
Hello,
I tried many ways to install python packages on SAS, steps you provided are very helpful as they reduced my pain. But I want to know one thing what is Generative AI? Is this relatable to SAS
Thanks
The SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment.
SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.
Find more tutorials on the SAS Users YouTube channel.