โ06-19-2025 06:01 PM
โ06-22-2025 08:04 PM
Hello @Isi , I got around this by creating a requirements.txt file instead of a symlink. With the wheel path in there, I can just do pip install -r /path/to/requirements.txt and have it installed. I am now having another issue where the notebook gives me a ModuleNotFoundError when running as a job, even after installing the package. It works when I run it manually. It also works in another sample job I created to test the problem.
@jameshughes I am able to install and run it in one of my notebooks in a serverless env.
โ06-22-2025 04:44 AM
Hello @lezwon ,
In my opinion, the issue might be related to how youโre using a symlink with a .whl file.
The problem is that pip doesnโt just care about the file name โ it also checks the internal metadata of the .whl file, which still declares the version as 0.1.0. When you run the notebook as a job, it might try to resolve package==latest based on the filename, which isnโt a valid version according to Pythonโs packaging standards (PEP 440), and that could be causing the Invalid requirement error.
It seems like using a symlink in this way might confuse pip during resolution, especially in job contexts.
Maybe you can resolve:
Instead of creating a symlink like package-latest.whl, simply install the real .whl file with its full version:
If you donโt want to hardcode the version in every notebook, consider parameterizing it using widgets or environment variables when running as a job.
Instead of relying on symlinks, you can upload your .whl files using proper versioning (package-0.1.0.whl, package-0.1.1.whl, etc.), and write a small script that automatically installs the most recent one:
files = dbutils.fs.ls("<path>")
latest = sorted([f for f in files if f.name.startswith("package-") and f.name.endswith(".whl")])[-1].path
%pip install {latest}
(something like that)
This way, you avoid using symlinks or naming tricks, and still always install the latest version available in your volume.
By the way, if you publish your package to a package manager like Nexus or Artifactory, itโs possible that using package==latest could actually work as expected.
These platforms manage version indexes and metadata internally, so they can resolve latest to the most recent published version, even if the filename doesnโt say so. That might help avoid the issues youโre seeing with direct .whl installation via symlinks.
Hope this helps, ๐
Isi
โ06-22-2025 11:08 AM - edited โ06-22-2025 11:08 AM
@lezwon Unless things have changed and I missed some major update, installing custom wheel files is not supported on serverless instances.
โ06-22-2025 08:04 PM
Hello @Isi , I got around this by creating a requirements.txt file instead of a symlink. With the wheel path in there, I can just do pip install -r /path/to/requirements.txt and have it installed. I am now having another issue where the notebook gives me a ModuleNotFoundError when running as a job, even after installing the package. It works when I run it manually. It also works in another sample job I created to test the problem.
@jameshughes I am able to install and run it in one of my notebooks in a serverless env.
โ06-23-2025 04:35 AM
@lezwon - Very interesting, as I have been wanting to do this and didn't attempt due to finding it was listed as not supported. Can you confirm what cloud provider you are using? AWS, Azure, GCP?
โ06-23-2025 05:03 AM
I am using azure
Passionate about hosting events and connecting people? Help us grow a vibrant local communityโsign up today to get started!
Sign Up Now