Could not find helper_fucntions library on my miniforge installation

Hi all,

I have a Miniforge installation on my laptop. I could not find the helper_functions library in my computer. I browsed through this community and also the web. Most of the links do not work. I could not find it even the github repository of deeplearning.ai. Can one help me find the right file and advise how to install it.
Thanks,

1 Like

From the programming interface, try opening the File menu. It might be there.

1 Like

It’s not there.

1 Like

Dear @ribusgan,

Download all lab files as a zip folder. Extract the folder and find required files/functions inside the folder.

Let me know if still face problems.

Dear @Girijesh
After much struggle, I downloaded the helper_functions.py from the relevant Github repository of deeplearning.ai, and put it in the same folder where miniforge installed all its libraries (like numpy etc). But the code “from helper_functions import print_llm_respLonse” is getting the below response:

"---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from helper_functions import print_llm_respLonse

ModuleNotFoundError: No module named ‘helper_functions’

1 Like

Here is the dir of the path:

Directory: C:\ProgramData\miniforge3\scripts

Mode LastWriteTime Length Name


-a---- 05-03-2025 04:11 74 2to3-script.py
-a---- 05-03-2025 04:11 54032 2to3.exe
-a---- 18-04-2025 22:01 205 activate
-a---- 10-01-2025 03:38 1111 activate.bat
-a---- 18-04-2025 22:01 195 archspec-script.py
-a---- 18-04-2025 22:01 54040 archspec.exe
-a---- 10-01-2025 03:38 130 conda-env-script.py
-a---- 07-01-2025 11:21 54040 conda-env.exe
-a---- 10-01-2025 03:38 499 conda-script.py
-a---- 07-01-2025 11:21 54040 conda.exe
-a---- 18-04-2025 22:01 209 cph-script.py
-a---- 18-04-2025 22:01 54040 cph.exe
-a---- 18-04-2025 22:01 294 deactivate
-a---- 11-04-2025 03:16 108405 debugpy-adapter.exe
-a---- 11-04-2025 03:16 108399 debugpy.exe
-a---- 18-04-2025 22:01 196 distro-script.py
-a---- 18-04-2025 22:01 54040 distro.exe
-a---- 18-03-2025 05:22 211 f2py-script.py
-a---- 26-02-2025 15:32 54032 f2py.exe
-a---- 04-04-2025 07:37 212 fonttools-script.py
-a---- 03-04-2025 20:21 54032 fonttools.exe
-a---- 25-04-2025 17:15 3102 helper_functions.py
-a---- 19-04-2025 10:12 188 httpx-script.py
-a---- 07-01-2025 11:21 54040 httpx.exe
-a---- 05-03-2025 04:11 72 idle-script.py
-a---- 05-03-2025 04:11 54032 idle.exe
-a---- 19-04-2025 10:12 208 ipython-script.py
-a---- 07-01-2025 11:21 54040 ipython.exe
-a---- 19-04-2025 10:12 208 ipython3-script.py
-a---- 07-01-2025 11:21 54040 ipython3.exe
-a---- 19-04-2025 10:12 201 jlpm-script.py
-a---- 07-01-2025 11:21 54040 jlpm.exe
-a---- 18-04-2025 22:01 1217 jsondiff
-a---- 18-04-2025 22:01 3878 jsonpatch
-a---- 03-09-2024 00:22 1830 jsonpointer-script.py
-a---- 01-08-2024 05:39 54032 jsonpointer.exe
-a---- 19-04-2025 10:12 197 jsonschema-script.py
-a---- 07-01-2025 11:21 54040 jsonschema.exe
-a---- 19-04-2025 10:12 202 jupyter-console-script.py
-a---- 07-01-2025 11:21 54040 jupyter-console.exe
-a---- 19-04-2025 10:12 219 jupyter-dejavu-script.py
-a---- 07-01-2025 11:21 54040 jupyter-dejavu.exe
-a---- 19-04-2025 10:12 201 jupyter-events-script.py
-a---- 07-01-2025 11:21 54040 jupyter-events.exe
-a---- 19-04-2025 10:12 264 jupyter-execute
-a---- 19-04-2025 10:12 207 jupyter-kernel-script.py
-a---- 07-01-2025 11:21 54040 jupyter-kernel.exe
-a---- 19-04-2025 10:12 245 jupyter-kernelspec-script.py
-a---- 07-01-2025 11:21 54040 jupyter-kernelspec.exe
-a---- 19-04-2025 10:12 200 jupyter-lab-script.py
-a---- 07-01-2025 11:21 54040 jupyter-lab.exe
-a---- 19-04-2025 10:12 207 jupyter-labextension-script.py
-a---- 07-01-2025 11:21 54040 jupyter-labextension.exe
-a---- 19-04-2025 10:12 203 jupyter-labhub-script.py
-a---- 07-01-2025 11:21 54040 jupyter-labhub.exe
-a---- 19-04-2025 10:12 203 jupyter-migrate-script.py
-a---- 07-01-2025 11:21 54040 jupyter-migrate.exe
-a---- 19-04-2025 10:12 205 jupyter-nbconvert-script.py
-a---- 07-01-2025 11:21 54040 jupyter-nbconvert.exe
-a---- 19-04-2025 10:12 195 jupyter-notebook-script.py
-a---- 07-01-2025 11:21 54040 jupyter-notebook.exe
-a---- 19-04-2025 10:12 204 jupyter-run-script.py
-a---- 07-01-2025 11:21 54040 jupyter-run.exe
-a---- 19-04-2025 10:12 203 jupyter-script.py
-a---- 19-04-2025 10:12 207 jupyter-server-script.py
-a---- 07-01-2025 11:21 54040 jupyter-server.exe
-a---- 19-04-2025 10:12 208 jupyter-troubleshoot-script.py
-a---- 07-01-2025 11:21 54040 jupyter-troubleshoot.exe
-a---- 19-04-2025 10:12 236 jupyter-trust-script.py
-a---- 07-01-2025 11:21 54040 jupyter-trust.exe
-a---- 07-01-2025 11:21 54040 jupyter.exe
-a---- 02-01-2025 22:37 205 mamba-script.py
-a---- 11-12-2024 22:25 54032 mamba.exe
-a---- 18-04-2025 22:01 217 normalizer-script.py
-a---- 18-04-2025 22:01 54040 normalizer.exe
-a---- 18-03-2025 05:22 211 numpy-config-script.py
-a---- 26-02-2025 15:32 54032 numpy-config.exe
-a---- 18-04-2025 22:01 205 pip-script.py
-a---- 18-04-2025 22:01 54040 pip.exe
-a---- 18-04-2025 22:01 205 pip3-script.py
-a---- 18-04-2025 22:01 54040 pip3.exe
-a---- 19-04-2025 10:12 206 pybabel-script.py
-a---- 07-01-2025 11:21 54040 pybabel.exe
-a---- 05-03-2025 04:11 57 pydoc-script.py
-a---- 05-03-2025 04:11 54032 pydoc.exe
-a---- 04-04-2025 07:37 209 pyftmerge-script.py
-a---- 03-04-2025 20:21 54032 pyftmerge.exe
-a---- 04-04-2025 07:37 210 pyftsubset-script.py
-a---- 03-04-2025 20:21 54032 pyftsubset.exe
-a---- 19-04-2025 10:12 199 pygmentize-script.py
-a---- 07-01-2025 11:21 54040 pygmentize.exe
-a---- 19-04-2025 10:12 193 pyjson5-script.py
-a---- 07-01-2025 11:21 54040 pyjson5.exe
-a---- 28-02-2025 21:10 219 pyside6-rcc-script.py
-a---- 26-02-2025 15:32 54032 pyside6-rcc.exe
-a---- 28-02-2025 21:10 219 pyside6-uic-script.py
-a---- 26-02-2025 15:32 54032 pyside6-uic.exe
-a---- 05-10-2024 00:56 27337 pywin32_postinstall.py
-a---- 05-10-2024 00:56 3719 pywin32_testall.py
-a---- 19-04-2025 10:12 202 send2trash-script.py
-a---- 07-01-2025 11:21 54040 send2trash.exe
-a---- 18-04-2025 22:01 191 tqdm-script.py
-a---- 18-04-2025 22:01 54040 tqdm.exe
-a---- 04-04-2025 07:37 207 ttx-script.py
-a---- 03-04-2025 20:21 54032 ttx.exe
-a---- 18-04-2025 22:01 192 wheel-script.py
-a---- 18-04-2025 22:01 54040 wheel.exe
-a---- 19-04-2025 10:12 200 wsdump-script.py
-a---- 07-01-2025 11:21 54040 wsdump.exe

Have you tried placing helper_functions.py in the same directory as the .ipynb assignment file? I think they have to be in the same directory.

@bmiteva
I think they are in the same folder. But how does one check which one is the “ipynb assignment folder”?

I meant that I think helper_functions.py should be in the same folder that the .ipynb file is saved in. I presumed you are working on an assignment, with a .ipynb extension. I do not see an .ipynb file in the directory you listed, which is why I think they are not in the same folder.

You could not find it on DLAI’s public repo, because most of DLAI’s course materials are not public.

@TMosh

I somehow did.

But my question to you is, if you are correct, then no one can run their helper_fucntions.ai outside deeplearning’s environment, right? Nobody will have the file! But many people seem to have. And why would deeplearning.ai not equip its students to run these in their local enviroment, but only from theirs?!

Anyway, my problem continues.

Shouldn’t it be saved where all libraries/ modueles are saved?

I believe others have found where that file is stored in the course assignments. It’s a popular topics on the discussion forum. Have you tried doing a forum search for the file name?

The file is correct.
I figured out that it needed to be in the Lib folder under miniforge3 folder. Some google research helped it.
But then it cannot execute the module because it misses some more libraries/ modules.
The opening codes are:

#import gradio as gr
import os

from openai import OpenAI
from dotenv import load_dotenv
import csv

Get the OpenAI API key from the .env file

load_dotenv(‘.env’, override=True)
openai_api_key = os.getenv(‘OPENAI_API_KEY’)

Set up the OpenAI client

client = OpenAI(api_key=openai_api_key)

So I need more resources to download, I guess.

@TMosh
The answers to your implied question in the sentence “I believe others have found where that file is stored in the course assignments. It’s a popular topics on the discussion forum.” - could be two.

  1. They are not a 58 year old newbie who is trying to learn stuff that he has not done in his life.
  2. They are not trying to use the function in their local environment

Anyway, I will persevere in finding a solution, although I don’t need to. It’s a skinny course on python and does not introduce a lot of basic concepts. But I will complete it and also will find a solution to this niggling problem.
:smiley:

1 Like

In Module 4, there is a lab called “Install Python on your computer (optional)” which discusses setting up your own environment and getting API keys.

Regarding files such as helper_functions.py, they tend to be available from Lab Files, near the upper right-hand corner of the page of the relevant assignment on Coursera. You can download them more easily from there.

3 Likes

At the end of the course? Great!! Thank you!

Anyway, I have found most of the answers myself. At the cost of a lot of time!
But it will be great to check at the end of the course to see if I did exactly the same as what they suggest.
Thanks again, all.

2 Likes

Hi @ribusgan,

As @TMosh mentioned, our (DL.AI) courses don’t have public repositories for majority of our courses, especially not for AI Python for Beginners, so I’m keen to know from which repository you got the code from. Can you share that?

Chances are, you might have gotten it from a repository which someone else created using our course material, which is very common.

As others have instructed you, and to answer this:

The only way you can download these files in an official manner is:

If you are taking the Course on Coursera:

Open the lab you want the files for, and on the top right corner, click, Lab files:

When the panel opens, you can either click on Download all files or select the file you want to download.

If you are taking the Course on our website:

  1. Open the notebook.
  2. After the notebook opens up, click File → Open.... Depending on your view, it could be Menu --> File --> Open...
  3. After the workspace opens up, click the checkbox next to the notebook, it will then show you a Shutdown option, click that. This will turn your notebook icon from green to grey.
  4. Next, click the checkbox next to the notebook again, and now you’ll see the Download option.

Similarly, steps 1, 2, 4 can be used to download any other file as well.


Once downloaded, all of the relevant files need to be in the same place/folder/directory as the notebook file in order for the notebook to run as it is. And of course, you need to add your own OpenAI API key, as instructed, in the helper_functions.py file to be able to use those functions.

Let me know if you’d need any help.

Best,
Mubsi

1 Like

Looks like I found them in a repository created by someone else. I am not able to find it again. But if and when I find it, I will share with you.
In my latest attempt (after installing OpenAI and dotenv through conda install), I got this error message:


OpenAIError Traceback (most recent call last)
Cell In[1], line 1
----> 1 from helper_functions import print_llm_response, get_llm_response

File C:\ProgramData\miniforge3\Lib\helper_functions.py:13
10 openai_api_key = os.getenv(‘OPENAI_API_KEY’)
12 # Set up the OpenAI client
—> 13 client = OpenAI(api_key=openai_api_key)
16 def read_csv_dict(csv_file_path):
17 “”“This function takes a csv file and loads it as a dict.”“”

File C:\ProgramData\miniforge3\Lib\site-packages\openai_client.py:116, in OpenAI.init(self, api_key, organization, project, base_url, websocket_base_url, timeout, max_retries, default_headers, default_query, http_client, _strict_response_validation)
114 api_key = os.environ.get(“OPENAI_API_KEY”)
115 if api_key is None:
→ 116 raise OpenAIError(
117 “The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable”
118 )
119 self.api_key = api_key
121 if organization is None:

OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable


1 Like

@Mubsi
Here it is!!
:grinning_face_with_smiling_eyes:

1 Like

Hi @ribusgan,

As you can see in the name of the repo, annoyingCode/deeplearning-ai-short-courses, this is a repository made by someone called annoyingCode, and is not ours.

For future reference, unless specifically mentioned in our course, we don’t have public repos for any of them.

1 Like