<?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: Add-On Builder [pandas]: ModuleNotFoundError: No module named 'mmap' in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/589400#M11845</link>
    <description>&lt;P&gt;to my previous answer (get missing mmap+cmath): .... the same can be sure achieved by selecting older version of `Py for Scientific computing` on the download page; but I have not an idea which one includes Py3.7.&lt;/P&gt;</description>
    <pubDate>Wed, 16 Mar 2022 18:56:20 GMT</pubDate>
    <dc:creator>mzvolsky</dc:creator>
    <dc:date>2022-03-16T18:56:20Z</dc:date>
    <item>
      <title>Add-On Builder [pandas]: ModuleNotFoundError: No module named 'mmap'</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/542929#M5215</link>
      <description>&lt;P&gt;Issue importing pandas module into Splunk Add-on Builder&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import re
import sys
import os

ta_name = 'TA-urlparse'
ta_lib_name = '/usr/local/lib/python3.7/site-packages'
pattern = re.compile(r"[\\/]etc[\\/]apps[\\/][^\\/]+[\\/]bin[\\/]?$")
new_paths = [path for path in sys.path if not pattern.search(path) or ta_name in path]
new_paths.insert(0, os.path.sep.join([ta_lib_name]))
sys.path = new_paths

import numpy as np
import pandas
import requests
import ipaddress
import time
from datetime import datetime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;The Error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Traceback (most recent call last):
  File "/apps/splunk/etc/apps/TA-urlparse/bin/urltest_1615256627_866.py", line 14, in &amp;lt;module&amp;gt;
    import input_module_urltest_1615256627_866 as input_module
  File "/apps/splunk/etc/apps/TA-urlparse/bin/input_module_urltest_1615256627_866.py", line 16, in &amp;lt;module&amp;gt;
    import pandas
  File "/usr/local/lib/python3.7/site-packages/pandas/__init__.py", line 52, in &amp;lt;module&amp;gt;
    from pandas.core.api import (
  File "/usr/local/lib/python3.7/site-packages/pandas/core/api.py", line 29, in &amp;lt;module&amp;gt;
    from pandas.core.groupby import Grouper, NamedAgg
  File "/usr/local/lib/python3.7/site-packages/pandas/core/groupby/__init__.py", line 1, in &amp;lt;module&amp;gt;
    from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
  File "/usr/local/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 57, in &amp;lt;module&amp;gt;
    from pandas.core.aggregation import (
  File "/usr/local/lib/python3.7/site-packages/pandas/core/aggregation.py", line 27, in &amp;lt;module&amp;gt;
    from pandas.core.series import FrameOrSeriesUnion, Series
  File "/usr/local/lib/python3.7/site-packages/pandas/core/series.py", line 68, in &amp;lt;module&amp;gt;
    from pandas.core import algorithms, base, generic, nanops, ops
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 102, in &amp;lt;module&amp;gt;
    from pandas.io.formats import format as fmt
  File "/usr/local/lib/python3.7/site-packages/pandas/io/formats/format.py", line 71, in &amp;lt;module&amp;gt;
    from pandas.io.common import stringify_path
  File "/usr/local/lib/python3.7/site-packages/pandas/io/common.py", line 7, in &amp;lt;module&amp;gt;
    import mmap
ModuleNotFoundError: No module named 'mmap'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Extensive" Troubleshooting:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;/usr/bin/python3 -m pip install mmap
ERROR: Could not find a version that satisfies the requirement mmap
ERROR: No matching distribution found for mmap&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Per:&amp;nbsp;&lt;A href="https://community.splunk.com/t5/All-Apps-and-Add-ons/how-can-I-enable-MMAP-caching-in-Google-GeoIP-of-MaxMind/m-p/33754" target="_blank"&gt;https://community.splunk.com/t5/All-Apps-and-Add-ons/how-can-I-enable-MMAP-caching-in-Google-GeoIP-of-MaxMind/m-p/33754&lt;/A&gt;&lt;/P&gt;&lt;P&gt;copied mmap.so and am now getting the following:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Traceback (most recent call last):
  File "/apps/splunk/etc/apps/TA-urlparse/bin/urltest_1615264087_827.py", line 14, in &amp;lt;module&amp;gt;
    import input_module_urltest_1615264087_827 as input_module
  File "/apps/splunk/etc/apps/TA-urlparse/bin/input_module_urltest_1615264087_827.py", line 16, in &amp;lt;module&amp;gt;
    import pandas
  File "/usr/local/lib/python3.7/site-packages/pandas/__init__.py", line 52, in &amp;lt;module&amp;gt;
    from pandas.core.api import (
  File "/usr/local/lib/python3.7/site-packages/pandas/core/api.py", line 29, in &amp;lt;module&amp;gt;
    from pandas.core.groupby import Grouper, NamedAgg
  File "/usr/local/lib/python3.7/site-packages/pandas/core/groupby/__init__.py", line 1, in &amp;lt;module&amp;gt;
    from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
  File "/usr/local/lib/python3.7/site-packages/pandas/core/groupby/generic.py", line 57, in &amp;lt;module&amp;gt;
    from pandas.core.aggregation import (
  File "/usr/local/lib/python3.7/site-packages/pandas/core/aggregation.py", line 27, in &amp;lt;module&amp;gt;
    from pandas.core.series import FrameOrSeriesUnion, Series
  File "/usr/local/lib/python3.7/site-packages/pandas/core/series.py", line 68, in &amp;lt;module&amp;gt;
    from pandas.core import algorithms, base, generic, nanops, ops
  File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 102, in &amp;lt;module&amp;gt;
    from pandas.io.formats import format as fmt
  File "/usr/local/lib/python3.7/site-packages/pandas/io/formats/format.py", line 71, in &amp;lt;module&amp;gt;
    from pandas.io.common import stringify_path
  File "/usr/local/lib/python3.7/site-packages/pandas/io/common.py", line 7, in &amp;lt;module&amp;gt;
    import mmap
ImportError: /apps/splunk/lib/python3.7/mmap.so: undefined symbol: PL_mmap_page_size&lt;/LI-CODE&gt;&lt;P&gt;Any Ideas?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2021 04:33:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/542929#M5215</guid>
      <dc:creator>secret_lang</dc:creator>
      <dc:date>2021-03-09T04:33:30Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Builder [pandas]: ModuleNotFoundError: No module named 'mmap'</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/562501#M9639</link>
      <description>&lt;P&gt;This is what worked for me: download the&amp;nbsp;Python for Scientific Computing app &lt;A href="https://splunkbase.splunk.com/app/2882/" target="_blank" rel="noopener"&gt;https://splunkbase.splunk.com/app/2882&lt;/A&gt;&amp;nbsp;and copy the following two files&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/opt/splunk/etc/apps/Splunk_SA_Scientific_Python_linux_x86_64/bin/linux_x86_64/lib/python3.7/lib-dynload/mmap.cpython-37m-x86_64-linux-gnu.so&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;/opt/splunk/etc/apps/Splunk_SA_Scientific_Python_linux_x86_64/bin/linux_x86_64/lib/python3.7/lib-dynload/cmath.cpython-37m-x86_64-linux-gnu.so&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;to&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;/opt/splunk/lib/python3.7&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Tested it with&amp;nbsp;custom search commands.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 07 Aug 2021 23:05:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/562501#M9639</guid>
      <dc:creator>andreasz</dc:creator>
      <dc:date>2021-08-07T23:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Builder [pandas]: ModuleNotFoundError: No module named 'mmap'</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/589395#M11844</link>
      <description>&lt;P&gt;&lt;SPAN&gt;In Python for Scientific Computing I see Py3.8 which differs from the version in splunk `bin/splunk cmd python --version`, which was 3.7.10. So I have Py3.7 installed (using `pyenv install 3.7.10` which enables more python versions on the machine) and from ~/.pyenv/versions/3.7.10 I have copied the both missing files into `/opt/splunk/lib/python3.7/lib-dynload`.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The `pip install splunk-sdk` then run well for me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 18:51:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/589395#M11844</guid>
      <dc:creator>mzvolsky</dc:creator>
      <dc:date>2022-03-16T18:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: Add-On Builder [pandas]: ModuleNotFoundError: No module named 'mmap'</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/589400#M11845</link>
      <description>&lt;P&gt;to my previous answer (get missing mmap+cmath): .... the same can be sure achieved by selecting older version of `Py for Scientific computing` on the download page; but I have not an idea which one includes Py3.7.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Mar 2022 18:56:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Add-On-Builder-pandas-ModuleNotFoundError-No-module-named-mmap/m-p/589400#M11845</guid>
      <dc:creator>mzvolsky</dc:creator>
      <dc:date>2022-03-16T18:56:20Z</dc:date>
    </item>
  </channel>
</rss>

