OCI Data Science: Difficulty in Loading Custom Python Packages in Jupyter Kernel
I've spent hours debugging this and I'm converting an old project and I've searched everywhere and can't find a clear answer. I'm currently using the Oracle Cloud Infrastructure (OCI) Data Science service and have set up a Jupyter notebook for my project. I need to import a custom Python package that I've packaged into a .whl file and uploaded to OCI Object Storage. However, I'm working with an scenario where the kernel doesn't seem to recognize the package after I've installed it. I'm using the following code to install the package in my notebook: ```python !pip install --upgrade --force-reinstall --no-deps https://objectstorage.us-ashburn-1.oraclecloud.com/n/namespace-string/b/bucket-name/o/my_custom_package-0.1-py3-none-any.whl ``` After running this command, the output indicates that the package has been installed successfully, but when I try to import it using `import my_custom_package`, I get an behavior stating `ModuleNotFoundError: No module named 'my_custom_package'`. I've also tried restarting the kernel and running the installation command multiple times, but nothing seems to work. To confirm that the package is in the correct location, I also executed: ```python !pip list | grep my_custom_package ``` This returns no results, which leads me to believe that the package isn't being recognized by the environment. I have checked that the bucket is publicly accessible, and I have verified that the `whl` file is valid by installing it locally on my machine without issues. Could this be related to the environment in OCI Data Science not properly handling the installed packages? Is there a specific procedure for making custom packages available in the Jupyter notebook environment? Any help or guidance would be greatly appreciated! My development environment is Windows. What's the best practice here? How would you solve this? Any ideas what could be causing this? Thanks in advance! Thanks for taking the time to read this! Am I approaching this the right way?