Forum Discussion
mssparkutils inside python package
- Anonymous2 years ago
Hi bcdobbs
Thanks for explaining the issue.
Please install dummy notebookutils in local environment. This will solve your issue.pip install dummy-notebookutilsFor more information please refer to this link: dummy-notebookutils
Hope this helps. Please let me know if you have any further questions.
I've gone back and built a very simple example.
Inside a notebook I can run:
def run_me_local():
help(mssparkutils)
run_me_local()
and it happily returns the help description for mssparkutils.
If I wrap the same thing in a python wheel package and import it into an environment:
My question is how do I build a wheel file that "knows" about mssparkutils? In my local environment mssparkutils doesn't exist which I suspect is problem.
Full code used to produce the wheel:
my_code.py:
def run_me():
help(mssparkutils)
setup.py (guessing I need mssparkutils in the install_requires but it then says it doesn't exist:
from setuptools import setup, find_packages
setup(
name='wheel_test',
version='0.1',
packages=find_packages(),
install_requires=[
],
author='Ben Dobbs',
author_email='[email protected]',
description='Wheel Testing',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
)
- Anonymous2 years agoNot applicable
Hi bcdobbs
Thanks for explaining the issue.
Please install dummy notebookutils in local environment. This will solve your issue.pip install dummy-notebookutilsFor more information please refer to this link: dummy-notebookutils
Hope this helps. Please let me know if you have any further questions.- bcdobbs2 years agoCommunity Champion
Thanks I literally just found it works ok if I add
from notebookutils import mssparkutilsThe dummy-notebookutils stops it complaining locally though so thank you for that.
- Anonymous2 years agoNot applicable
Hi bcdobbs
Glad that your query got resolved. Please continue using Fabric Community for any help regarding your queries.