<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Install additional Python packages for SAS Intelligent Decisioning in Administration and Deployment</title>
    <link>https://communities.sas.com/t5/Administration-and-Deployment/Install-additional-Python-packages-for-SAS-Intelligent/m-p/884579#M26923</link>
    <description>&lt;P&gt;Adding the cx_Oracle package to change-configuration.yaml requires you to do a build and apply to get the change into the sas-pyconfig cronjob definition.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to avoid a build and apply you can use OpenLens or some other means to edit the sas-pyconfig-parameters configmap to add the cx_Oracle package to the default_py.pip_install_packages parameter that defines the current sas-pyconfig job.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I expect this will take care of the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't help...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. I cannot see the resources: from your kustomization.yaml but make sure you have a reference to&amp;nbsp;&lt;BR /&gt;- site-config/sas-open-source-config/python in there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The sas-pyconfig job takes quite a while to complete so check the log from your sas-pyconfig-adhoc job just to make sure it completed and did not have any errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to successfully add cx_Oracle to a test deployment following the blog steps so I think you are really close.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2023 20:56:52 GMT</pubDate>
    <dc:creator>ScottMcCauley</dc:creator>
    <dc:date>2023-07-12T20:56:52Z</dc:date>
    <item>
      <title>Install additional Python packages for SAS Intelligent Decisioning</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Install-additional-Python-packages-for-SAS-Intelligent/m-p/884276#M26905</link>
      <description>&lt;P&gt;I want to install additional Python package on SAS Viya to be used on SAS Intelligent Decisioning Python code files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But still encountering this error "ModuleNotFoundError"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ltuala_0-1689033641256.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85703iAAF0B1E032CBF90B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ltuala_0-1689033641256.png" alt="ltuala_0-1689033641256.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Had tried to follow this blog post but skip some parts and follow sections I deemed necessary for my case.&amp;nbsp;&lt;A title="Configuring SAS Viya for Python Integration" href="https://communities.sas.com/t5/SAS-Communities-Library/Configuring-SAS-Viya-for-Python-Integration/ta-p/847459" target="_self"&gt;Configuring SAS Viya for Python Integration &lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here are the steps I have done:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Created the change-configuration.yaml on this path ../site-config/sas-pyconfig. The permission is set to 777 for both the file and the parent folder.&amp;nbsp;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ltuala_4-1689034395933.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85707iDF5D9A7D572EEF01/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ltuala_4-1689034395933.png" alt="ltuala_4-1689034395933.png" /&gt;&lt;/span&gt;&lt;/LI&gt;&lt;LI&gt;Here is the content of the file:&lt;BR /&gt;Set the global.enabled and global.python_enabled to &lt;STRONG&gt;true&amp;nbsp;&lt;BR /&gt;&lt;/STRONG&gt;Added the additional package &lt;STRONG&gt;cx_Oracle &lt;/STRONG&gt;to default_py.pip_install_packages&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;apiVersion: builtin
kind: PatchTransformer
metadata:
  name: sas-pyconfig-custom-parameters
patch: |-
  - op: replace 
    path: /data/global.enabled
    value: "true"
  - op: replace 
    path: /data/global.python_enabled
    value: "true"
  - op: replace 
    path: /data/global.r_enabled
    value: "false"
  - op: replace
    path: /data/global.pvc
    value: "/opt/sas/viya/home/sas-pyconfig"
  - op: replace
    path: /data/global.python_profiles
    value: "default_py"
  - op: replace
    path: /data/global.r_profiles
    value: "default_r"
  - op: replace
    path: /data/default_py.configure_opts
    value: "--enable-optimizations"
  - op: replace
    path: /data/default_r.configure_opts
    value: "--enable-memory-profiling --enable-R-shlib --with-blas --with-lapack --with-readline=no --with-x=no --enable-BLAS-shlib"
  - op: replace
    path: /data/default_py.cflags
    value: "-fPIC"
  - op: replace
    path: /data/default_r.cflags
    value: "-fPIC"
  - op: replace
    path: /data/default_py.pip_install_nobinary
    value: "Prophet sas_kernel"
  - op: replace
    path: /data/default_py.pip_install_packages
    value: "Prophet 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 cx_Oracle"
  - op: replace
    path: /data/default_py.python_signer
    value: https://keybase.io/ambv/pgp_keys.asc
  - op: replace
    path: /data/default_py.python_signature
    value: https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz.asc
  - op: replace
    path: /data/default_py.python_tarball
    value: https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz
  - op: replace
    path: /data/default_r.r_tarball
    value: https://cloud.r-project.org/src/base/R-4/R-4.2.2.tar.gz
  - op: replace
    path: /data/default_r.packages
    value: "dplyr jsonlite httr tidyverse randomForest xgboost forecast"
target:
  version: v1
  kind: ConfigMap
  name: sas-pyconfig-parameters​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;3. Edit the kustomization.yaml to include this file (last line).&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ltuala_5-1689035359891.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85708iBDF32DE45C6E3473/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ltuala_5-1689035359891.png" alt="ltuala_5-1689035359891.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;4. Run the command:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sas"&gt;kubectl create job sas-pyconfig-adhoc -n sas-viya --from cronjob/sas-pyconfig&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ltuala_6-1689035600893.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85709i476130495DDBF8FD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ltuala_6-1689035600893.png" alt="ltuala_6-1689035600893.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;5. Then did the testing on SAS Studio.&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ltuala_0-1689033641256.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85703iAAF0B1E032CBF90B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ltuala_0-1689033641256.png" alt="ltuala_0-1689033641256.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;Currently stuck on this issue, I might have missed important steps. Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Jul 2023 00:54:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Install-additional-Python-packages-for-SAS-Intelligent/m-p/884276#M26905</guid>
      <dc:creator>ltuala</dc:creator>
      <dc:date>2023-07-11T00:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Install additional Python packages for SAS Intelligent Decisioning</title>
      <link>https://communities.sas.com/t5/Administration-and-Deployment/Install-additional-Python-packages-for-SAS-Intelligent/m-p/884579#M26923</link>
      <description>&lt;P&gt;Adding the cx_Oracle package to change-configuration.yaml requires you to do a build and apply to get the change into the sas-pyconfig cronjob definition.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to avoid a build and apply you can use OpenLens or some other means to edit the sas-pyconfig-parameters configmap to add the cx_Oracle package to the default_py.pip_install_packages parameter that defines the current sas-pyconfig job.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I expect this will take care of the problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that doesn't help...&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;1. I cannot see the resources: from your kustomization.yaml but make sure you have a reference to&amp;nbsp;&lt;BR /&gt;- site-config/sas-open-source-config/python in there.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;3. The sas-pyconfig job takes quite a while to complete so check the log from your sas-pyconfig-adhoc job just to make sure it completed and did not have any errors.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was able to successfully add cx_Oracle to a test deployment following the blog steps so I think you are really close.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck!&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 20:56:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Administration-and-Deployment/Install-additional-Python-packages-for-SAS-Intelligent/m-p/884579#M26923</guid>
      <dc:creator>ScottMcCauley</dc:creator>
      <dc:date>2023-07-12T20:56:52Z</dc:date>
    </item>
  </channel>
</rss>

