Forum Discussion
Using custom python library in notebook
Thanks for your responses.
To answer Srisakthi, yes the library is present:
And to Anonymous, i've tried the %pip list and my package isn't present.
Some additional info i can give is:
- I've created the package my self, based on een small set of python files. However, since the package does work when i install it through a notebook cell, I''ve concluded that the package isn't the issue.
This is the structure and one of the functions is the package:
This is the code i've used for the creation of the package:
from setuptools import find_packages, setup
setup(
name='idpdemo',
version='0.0.1',
description='demo_description',
author='Broeks',
packages=find_packages(include=['idp']),
install_requires=[], # Add your dependencies here
extras_require={
'dev': ['pytest'] # Test dependencies go here
}
)And I've tried to import the function through the following code:
from idp import check_dataframe_for_duplicate_keysIf you need additional information, let me known.
HI Broeks,
I'd like to suggest text with other whl format custom libraries to confirm if this issue only applies on your side.
Regards,
Xiaoxin Sheng
- Broeks1 year agoHelper II
Yes, will do. I'm quitte busy these days, so a response might take a few days. But thanks for the help so far!
- Anonymous1 year agoNot applicable
- jj441 year agoAdvocate I
Hi Broeks
Did you manage to solve this problem? I'm at the point in a project where writing a custom library maybe a better option, rather than executing notebook from within another notebook.
Cheers
Jeff Jones
- Broeks1 year agoHelper II
Hello Jeff,
Yes i was able to fix the issue. My package was not correct.
Now I'm able to upload and publish a whl file through the fabric api.
https://learn.microsoft.com/en-us/rest/api/fabric/environment/spark-libraries