# How can I install the utils package?

**URL:** <https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606>\
**Category:** Understanding and Applying Text Embeddings with...\
**Created:** [September 6, 2023, 6:51pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606 "2023-09-06T18:51:51Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanimesa](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sanimesa](https://dlai.staged-by-discourse.com/u/sanimesa)\
**Post date:** [September 6, 2023, 6:51pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/1 "2023-09-06T18:51:51Z")

</div>

I am running the examples in google colab, but unable to figure out the utils package. I was able to authenticate using google\_auth.authenticate\_user(), however stuck at the below:

> from utils import plot\_2D

Thanks.

---

<div class="post-metadata">

**Author:** ![elirod](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/elirod/32/55842_2.png) [@elirod](https://dlai.staged-by-discourse.com/u/elirod)\
**Post date:** [September 6, 2023, 10:04pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/2 "2023-09-06T22:04:41Z")

</div>

hi @sanimesa

Welcome to the community.

Some packages might be attached in the course platform.

If you trying to running on your own environment, you have to download all the files related to the course in order to get it work.

For example:

You might be able to access all the stored files by clicking on the jupyter logo at the top-left.

 ![image](https://global.discourse-cdn.com/dlaistaging/original/3X/5/1/5178b6b317d4c82d5979e6528bac514d65b1e7d4.png)

 ![image](https://global.discourse-cdn.com/dlaistaging/original/3X/d/c/dc1d168f043b77bac35e68610d60b1081aa20fb8.png)

This example above is from another course. Just take as a reference

I hope this help

Best regards  
elirod

---

<div class="post-metadata">

**Author:** ![elirod](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/elirod/32/55842_2.png) [@elirod](https://dlai.staged-by-discourse.com/u/elirod)\
**Post date:** [September 6, 2023, 10:20pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/3 "2023-09-06T22:20:16Z")

</div>

I almost forgot.

In the course environment, all the authentications/credentials and API keys are stored in the course environment.

That means that if you intended to running in your own environment you have to use your own Google API, authentication/credentials Keys.

One more thing. Don’t forget that some environment variables use python-dotenv package to handle sensitive data. That means that you have to handle the .env file and imports by your self.

Here it is an article explain how to use it in case you need it:

> **[Using python-dotenv Load Environment Variables? - Spark By {Examples}](https://sparkbyexamples.com/python/using-python-dotenv-load-environment-variables/)**
>
> The python-dotenv package is popular for managing environment variables and keeping sensitive information out of code repositories. In this article, we

I hope this help

best regards  
elirod

---

<div class="post-metadata">

**Author:** ![sanimesa](https://avatars.discourse-cdn.com/v4/letter/s/5e9695/32.png) [@sanimesa](https://dlai.staged-by-discourse.com/u/sanimesa)\
**Post date:** [September 7, 2023, 9:38am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/4 "2023-09-07T09:38:51Z")

</div>

Awesome, thanks!

---

<div class="post-metadata">

**Author:** ![elirod](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/elirod/32/55842_2.png) [@elirod](https://dlai.staged-by-discourse.com/u/elirod)\
**Post date:** [September 7, 2023, 4:54pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/5 "2023-09-07T16:54:23Z")

</div>

You welcome, my friend!

---

<div class="post-metadata">

**Author:** ![Kanthi](https://avatars.discourse-cdn.com/v4/letter/k/3e96dc/32.png) [@Kanthi](https://dlai.staged-by-discourse.com/u/Kanthi)\
**Post date:** [September 8, 2023, 10:30am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/6 "2023-09-08T10:30:17Z")

</div>

In the course, utils package has no definition for the plot\_2D function and some other functions required, I am running on my local machines.

---

<div class="post-metadata">

**Author:** ![agershun](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/agershun/32/63474_2.png) [@agershun](https://dlai.staged-by-discourse.com/u/agershun)\
**Post date:** [September 11, 2023, 2:43am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/7 "2023-09-11T02:43:52Z")

</div>

There are different utils.py file versions for each lessons.  
To find plot2D function open the “Visualizing Embeding” lesson, then File/ Open…  
and open “utils.py” file. There you can see the requred functions.

---

<div class="post-metadata">

**Author:** ![farheen2](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@farheen2](https://dlai.staged-by-discourse.com/u/farheen2)\
**Post date:** [November 20, 2023, 7:07am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/8 "2023-11-20T07:07:36Z")

</div>

Hi

 ![Screenshot (877)](https://global.discourse-cdn.com/dlaistaging/original/3X/3/a/3a2f18595fb817ea8f476c5fed7b6984aad31013.png)

ImportError: cannot import name ‘authenticate’ from ‘utils’ (/usr/local/lib/python3.10/dist-packages/utils/ **init**.py)  
How do i fix this error

---

<div class="post-metadata">

**Author:** ![elirod](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/elirod/32/55842_2.png) [@elirod](https://dlai.staged-by-discourse.com/u/elirod)\
**Post date:** [November 20, 2023, 2:41pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/9 "2023-11-20T14:41:57Z")

</div>

Hi @farheen2

Welcome to the community.

If you are running locally you have to setting your environment variable with your own API keys or credentials.

---

<div class="post-metadata">

**Author:** ![farheen2](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@farheen2](https://dlai.staged-by-discourse.com/u/farheen2)\
**Post date:** [November 21, 2023, 8:43am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/10 "2023-11-21T08:43:46Z")

</div>

Hi  
Yes , I set up my API KEY and other credition . every time i am facing same issue utils is not importing packages

---

<div class="post-metadata">

**Author:** ![elirod](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/elirod/32/55842_2.png) [@elirod](https://dlai.staged-by-discourse.com/u/elirod)\
**Post date:** [November 21, 2023, 11:18am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/11 "2023-11-21T11:18:15Z")

</div>

Just to make sure, do you downloaded the untils.py file?

---

<div class="post-metadata">

**Author:** ![farheen2](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@farheen2](https://dlai.staged-by-discourse.com/u/farheen2)\
**Post date:** [November 22, 2023, 6:38am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/12 "2023-11-22T06:38:48Z")

</div>

no i didn’t download it. Can you tell if i download it , what would be its path

---

<div class="post-metadata">

**Author:** ![elirod](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/elirod/32/55842_2.png) [@elirod](https://dlai.staged-by-discourse.com/u/elirod)\
**Post date:** [November 22, 2023, 12:19pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/13 "2023-11-22T12:19:41Z")

</div>

You can store it on the main path of your project. After that, you can set up your credentials on the appropriate function available on the `untils.py` file

This might be fix the import error.

---

<div class="post-metadata">

**Author:** ![farheen2](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@farheen2](https://dlai.staged-by-discourse.com/u/farheen2)\
**Post date:** [November 23, 2023, 7:30am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/14 "2023-11-23T07:30:53Z")

</div>

Thank you

---

<div class="post-metadata">

**Author:** ![elirod](https://sea1.discourse-cdn.com/dlaistaging/user_avatar/dlai.staged-by-discourse.com/elirod/32/55842_2.png) [@elirod](https://dlai.staged-by-discourse.com/u/elirod)\
**Post date:** [November 23, 2023, 11:50am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/15 "2023-11-23T11:50:09Z")

</div>

You welcome.

let me know if you need additional help with this situation

---

<div class="post-metadata">

**Author:** ![farheen2](https://avatars.discourse-cdn.com/v4/letter/f/b9e5f3/32.png) [@farheen2](https://dlai.staged-by-discourse.com/u/farheen2)\
**Post date:** [November 24, 2023, 7:08am UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/16 "2023-11-24T07:08:51Z")

</div>

Sure  
Thank you

---

<div class="post-metadata">

**Author:** ![Sarma309](https://avatars.discourse-cdn.com/v4/letter/s/278dde/32.png) [@Sarma309](https://dlai.staged-by-discourse.com/u/Sarma309)\
**Post date:** [September 3, 2024, 1:57pm UTC](https://dlai.staged-by-discourse.com/t/how-can-i-install-the-utils-package/438606/17 "2024-09-03T13:57:00Z")

</div>

How to authenticate using google Collab?
