How to replicate the Jupyter Notebook setting to Visual studio

How to replicate the Jupyter Notebook for the AI Python for Beginners: Automating Tasks onto visual studio code .

I have added the helper_functions.py file to the lib folder and also installed the openai python lib using the pip command

Now getting the error
File “C:\Program Files\Python312\Lib\helper_functions.py”, line 4, in
from dotenv import load_doten

@menondeepak2002 I myself have not taken this course, but obviously this message is telling you you are missing further dependencies, in this case ‘dotenv’.

A quick Google suggests it is trying to load environment variables and I am not sure if you have access to those with this class.

As a further check, when downloading the notebook make sure you use the little ‘file’ icon in the upper right, and from there select ‘download’.

Doing so only from the File menu will only give you the current notebook.

The dotenv package is used to load environment variables from a .env file into your Python application’s environment. You can use load_dotenv from the python-dotenv package.

Perphaps, you should before to install the python-dotenv package:

pip install python-dotenv

and then :
from dotenv import load_doten

Hoping this can help you.

1 Like