<?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: Splunk 8 python 2.7 for an app in Splunk Enterprise Security</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487643#M8108</link>
    <description>&lt;P&gt;In the app conf files where you put python.version = python2, which stanzas did you use?  I can't seem to get this to work for the REST API modular input.  We would like to set it to python3 in server.conf, but since nothing is working in this add-on app, we are using the default settings of python2.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Apr 2020 18:01:11 GMT</pubDate>
    <dc:creator>rfetters</dc:creator>
    <dc:date>2020-04-16T18:01:11Z</dc:date>
    <item>
      <title>Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487637#M8102</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I'm trying to force an app to use python 2.7 on a Splunk 8 with enterprise security.&lt;/P&gt;

&lt;P&gt;The config in server.conf is set to:&lt;BR /&gt;
python.version = python3&lt;/P&gt;

&lt;P&gt;With this setting my app doesn't work anymore, if I change the server.conf to: python.version = python2, it works.&lt;/P&gt;

&lt;P&gt;But I would like to keep python3 in server.conf and force the app to use python2, I tried to add the following in the app.conf but it doesn't work:&lt;BR /&gt;
[install]&lt;BR /&gt;
python.version = python2&lt;/P&gt;

&lt;P&gt;Anyone knows how to force the app to use python 2 ?&lt;/P&gt;

&lt;P&gt;Thank you !&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 09:45:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487637#M8102</guid>
      <dc:creator>cfcvendorsuppor</dc:creator>
      <dc:date>2020-03-05T09:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487638#M8103</link>
      <description>&lt;P&gt;As I just posted in a thread that has yet to be approved, I have the reverse issue and I used a shell script to invoke Python 3:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/data/splunk/bin/python3.7m  /data/splunk/etc/apps/myprog/bin/myprog.py
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Maybe that technique would address your issue?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 13:10:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487638#M8103</guid>
      <dc:creator>julianniemeyer</dc:creator>
      <dc:date>2020-03-05T13:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487639#M8104</link>
      <description>&lt;P&gt;Thank for your answer, yes it could help. Where did you set this ? Somewhere within the app ?&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 14:19:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487639#M8104</guid>
      <dc:creator>cfcvendorsuppor</dc:creator>
      <dc:date>2020-03-05T14:19:18Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487640#M8105</link>
      <description>&lt;P&gt;Depending on the app version, it might not be advisable to change it. Just as an example:&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/Python3Migration/ES#Splunk_Enterprise_Security_version_6.1.x_and_Python_compatibility"&gt;https://docs.splunk.com/Documentation/Splunk/latest/Python3Migration/ES#Splunk_Enterprise_Security_version_6.1.x_and_Python_compatibility&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Mar 2020 17:53:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487640#M8105</guid>
      <dc:creator>lkutch_splunk</dc:creator>
      <dc:date>2020-03-05T17:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487641#M8106</link>
      <description>&lt;P&gt;Thank you for the info, I didn't see this. ES seem to be working fine even with the python2 flag in the server.conf, I see various files in the SplunkEnterpriseSecuritySuite app with the python3 flag, so I suppose this correctly overwrite the server.conf setting. I will try to set the phython 2 flag for my app in other conf file as well to see if it help and if I cant set the main config to python3.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 10:39:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487641#M8106</guid>
      <dc:creator>cfcvendorsuppor</dc:creator>
      <dc:date>2020-03-06T10:39:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487642#M8107</link>
      <description>&lt;P&gt;My problem is fixed, I did set "python.version = python2" in every .conf file of our app, not sure which one did the trick but I works. I was able to set back the main config to python3.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2020 12:07:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487642#M8107</guid>
      <dc:creator>cfcvendorsuppor</dc:creator>
      <dc:date>2020-03-06T12:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487643#M8108</link>
      <description>&lt;P&gt;In the app conf files where you put python.version = python2, which stanzas did you use?  I can't seem to get this to work for the REST API modular input.  We would like to set it to python3 in server.conf, but since nothing is working in this add-on app, we are using the default settings of python2.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Apr 2020 18:01:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/487643#M8108</guid>
      <dc:creator>rfetters</dc:creator>
      <dc:date>2020-04-16T18:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/514197#M9137</link>
      <description>&lt;P&gt;Had a similar issue with a TA-user-agents app. Fixed by adding&amp;nbsp;python.version = python2 to the following file.&lt;/P&gt;&lt;P&gt;x:\Splunk\etc\apps\TA-user-agents\default\transforms.conf&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Aug 2020 20:06:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/514197#M9137</guid>
      <dc:creator>chasiubaobao</dc:creator>
      <dc:date>2020-08-14T20:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/524750#M9384</link>
      <description>&lt;P&gt;I just had to fix/re-configure for this very issue:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;There are TWO methods to successfully control the python version in Splunk 8.x.&lt;BR /&gt;&lt;BR /&gt;Global (all apps by default will use this setting):&lt;BR /&gt;&lt;SPAN&gt;/system/local/server.conf -&lt;BR /&gt;&lt;BR /&gt;[general]&lt;BR /&gt;python.version = python2&lt;BR /&gt;&lt;BR /&gt;Note:&amp;nbsp; Your options are&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;python.version = {default|python|python2|python3}&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;App-specific:&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;/{some app i.e. eventgen}/local/app.conf&lt;BR /&gt;&lt;BR /&gt;[install]&lt;BR /&gt;python.version = python2&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Two hints:&lt;BR /&gt;1)&amp;nbsp; &amp;nbsp;Be very careful to place the python.version statement in the&amp;nbsp;&lt;STRONG&gt;correct&amp;nbsp;&lt;/STRONG&gt;stanza given the .conf file (see docs for more info)&amp;nbsp;&lt;BR /&gt;2)&amp;nbsp; &amp;nbsp;I highly recommend using the &lt;STRONG&gt;app-specific method&amp;nbsp;&lt;/STRONG&gt;as the global method will almost certainly cause issues with new Splunk apps (including your own) which require py3.&lt;BR /&gt;&lt;BR /&gt;I hope this is helpful.&lt;BR /&gt;Gregg -- TMM:&amp;nbsp; Platforms, IoT, and Verticals&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 01:09:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/524750#M9384</guid>
      <dc:creator>gdaly_splunk</dc:creator>
      <dc:date>2020-10-15T01:09:17Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk 8 python 2.7 for an app</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/574679#M10452</link>
      <description>&lt;P&gt;Actually, I found that I just needed to change my inputs.conf to force my scripted inputs to run on python 2. This worked fine when I added python.version = python2&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;[script://$SPLUNK_HOME/etc/apps/myapp/bin/my_app_collect_cloud.py]&lt;BR /&gt;python.version = python2&lt;BR /&gt;disabled = False&lt;BR /&gt;index = myindex&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I needed to do this, since upgrading from 8.0.6 to 8.2.2 as the apps were forced to use python3 on scripted inputs&lt;/P&gt;</description>
      <pubDate>Fri, 12 Nov 2021 01:18:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise-Security/Splunk-8-python-2-7-for-an-app/m-p/574679#M10452</guid>
      <dc:creator>matthewpearce</dc:creator>
      <dc:date>2021-11-12T01:18:16Z</dc:date>
    </item>
  </channel>
</rss>

