<?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: Need help with this python import error. in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28626#M20406</link>
    <description>&lt;P&gt;Ok, if this library is included in this DBR , can you please check &lt;A href="https://docs.databricks.com/release-notes/runtime/9.1ml.html" target="test_blank"&gt;https://docs.databricks.com/release-notes/runtime/9.1ml.html&lt;/A&gt; . If not. please check if you are installing this library from cluster with all dependencies . Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 17 Feb 2022 13:58:13 GMT</pubDate>
    <dc:creator>Atanu</dc:creator>
    <dc:date>2022-02-17T13:58:13Z</dc:date>
    <item>
      <title>Need help with this python import error.</title>
      <link>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28622#M20402</link>
      <description>&lt;P&gt;I am using databricks runtime 9.1 LTS ML and I got this error when I tried to import Scikit Learn package. I got the following error message:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;TypeError                                 Traceback (most recent call last)
&amp;lt;command-181041&amp;gt; in &amp;lt;module&amp;gt;
      1 # Scikit Learn ML Library
----&amp;gt; 2 from sklearn.metrics import *
      3 from sklearn.preprocessing import LabelEncoder
      4 from sklearn.preprocessing import MinMaxScaler, StandardScaler, PowerTransformer
      5 from sklearn.model_selection import train_test_split, TimeSeriesSplit
&amp;nbsp;
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
    156             # Import the desired module. If you're seeing this while debugging a failed import,
    157             # look at preceding stack frames for relevant error information.
--&amp;gt; 158             original_result = python_builtin_import(name, globals, locals, fromlist, level)
    159 
    160             is_root_import = thread_local._nest_level == 1
&amp;nbsp;
/usr/lib/python3.8/importlib/_bootstrap.py in _find_and_load(name, import_)
&amp;nbsp;
/usr/lib/python3.8/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
&amp;nbsp;
/usr/lib/python3.8/importlib/_bootstrap.py in _load_unlocked(spec)
&amp;nbsp;
/usr/lib/python3.8/importlib/_bootstrap.py in _load_backward_compatible(spec)
&amp;nbsp;
/databricks/python_shell/dbruntime/PostImportHook.py in load_module(self, fullname)
    214     def load_module(self, fullname):
    215         try:
--&amp;gt; 216             module = self.loader.load_module(fullname)
    217             notify_module_loaded(module)
    218         except (ImportError, AttributeError):
&amp;nbsp;
/databricks/python/lib/python3.8/site-packages/sklearn/__init__.py in &amp;lt;module&amp;gt;
     62 else:
     63     from . import __check_build
---&amp;gt; 64     from .base import clone
     65     from .utils._show_versions import show_versions
     66 
&amp;nbsp;
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
    156             # Import the desired module. If you're seeing this while debugging a failed import,
    157             # look at preceding stack frames for relevant error information.
--&amp;gt; 158             original_result = python_builtin_import(name, globals, locals, fromlist, level)
    159 
    160             is_root_import = thread_local._nest_level == 1
.....
....
....
/databricks/python/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/__init__.py in &amp;lt;module&amp;gt;
      1 from __future__ import absolute_import
      2 
----&amp;gt; 3 from .cloudpickle import *
      4 
      5 __version__ = '0.8.0'
&amp;nbsp;
/databricks/python_shell/dbruntime/PythonPackageImportsInstrumentation/__init__.py in import_patch(name, globals, locals, fromlist, level)
    156             # Import the desired module. If you're seeing this while debugging a failed import,
    157             # look at preceding stack frames for relevant error information.
--&amp;gt; 158             original_result = python_builtin_import(name, globals, locals, fromlist, level)
    159 
    160             is_root_import = thread_local._nest_level == 1
&amp;nbsp;
/databricks/python/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py in &amp;lt;module&amp;gt;
    150 
    151 
--&amp;gt; 152 _cell_set_template_code = _make_cell_set_template_code()
    153 
    154 
&amp;nbsp;
/databricks/python/lib/python3.8/site-packages/sklearn/externals/joblib/externals/cloudpickle/cloudpickle.py in _make_cell_set_template_code()
    131         )
    132     else:
--&amp;gt; 133         return types.CodeType(
    134             co.co_argcount,
    135             co.co_kwonlyargcount,
&amp;nbsp;
TypeError: an integer is required (got type bytes)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Feb 2022 18:21:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28622#M20402</guid>
      <dc:creator>qyu</dc:creator>
      <dc:date>2022-02-11T18:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this python import error.</title>
      <link>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28624#M20404</link>
      <description>&lt;P&gt;@Qian Yu​&amp;nbsp; I believe the error is coming while you are executing any particular code on notebook.Could you please check the python version?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 14:19:54 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28624#M20404</guid>
      <dc:creator>Atanu</dc:creator>
      <dc:date>2022-02-14T14:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this python import error.</title>
      <link>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28625#M20405</link>
      <description>&lt;P&gt;@Atanu Sarkar​&amp;nbsp;I am using databricks runtime 9.1ML LTS and python version is 3.8.10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am only just running import statement&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;from sklearn.metrics import *
from sklearn.preprocessing import LabelEncoder&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Feb 2022 23:43:17 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28625#M20405</guid>
      <dc:creator>qyu</dc:creator>
      <dc:date>2022-02-14T23:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with this python import error.</title>
      <link>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28626#M20406</link>
      <description>&lt;P&gt;Ok, if this library is included in this DBR , can you please check &lt;A href="https://docs.databricks.com/release-notes/runtime/9.1ml.html" target="test_blank"&gt;https://docs.databricks.com/release-notes/runtime/9.1ml.html&lt;/A&gt; . If not. please check if you are installing this library from cluster with all dependencies . Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 13:58:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/need-help-with-this-python-import-error/m-p/28626#M20406</guid>
      <dc:creator>Atanu</dc:creator>
      <dc:date>2022-02-17T13:58:13Z</dc:date>
    </item>
  </channel>
</rss>

