# Not installing "Inference"

**URL:** https://discuss.roboflow.com/t/not-installing-inference/5969
**Category:** 🤝  Community Help
**Created:** [May 27, 2024, 8:09pm UTC](https://discuss.roboflow.com/t/not-installing-inference/5969 "2024-05-27T20:09:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Satoshi\_Nakamoto](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/satoshi_nakamoto/32/4719_2.png) [@Satoshi\_Nakamoto](https://discuss.roboflow.com/u/Satoshi_Nakamoto)
#### Post date: [May 27, 2024, 8:09pm UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/1 "2024-05-27T20:09:16Z")

</div>

An error occurs when performing the installation Inference (pip install inference). What am I doing wrong?

- Object detection
- Windows / Google Chrome
- Screws2 Image Dataset

 ![1](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/2X/d/dcc018ba394e9ea07582b492fa5095136f4ce4cb.png)

---

<div class="post-metadata">

### Author: ![njmarraccini](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/njmarraccini/32/4737_2.png) [@njmarraccini](https://discuss.roboflow.com/u/njmarraccini)
#### Post date: [May 28, 2024, 11:07pm UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/2 "2024-05-28T23:07:04Z")

</div>

Hi Satoshi- can you try pip installing disutils into your .venv environment?

---

<div class="post-metadata">

### Author: ![Satoshi\_Nakamoto](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/satoshi_nakamoto/32/4719_2.png) [@Satoshi\_Nakamoto](https://discuss.roboflow.com/u/Satoshi_Nakamoto)
#### Post date: [May 29, 2024, 7:22am UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/3 "2024-05-29T07:22:45Z")

</div>

Hello Njmarraccini! I can, I just don’t know how! Can you give me any hint? I’m still a weak programmer…

---

<div class="post-metadata">

### Author: ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)
#### Post date: [May 29, 2024, 4:54pm UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/4 "2024-05-29T16:54:42Z")

</div>

Hey,  
You can install any package using `pip install <package_name>`, so `pip install disutils`

---

<div class="post-metadata">

### Author: ![Satoshi\_Nakamoto](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/satoshi_nakamoto/32/4719_2.png) [@Satoshi\_Nakamoto](https://discuss.roboflow.com/u/Satoshi_Nakamoto)
#### Post date: [May 29, 2024, 7:41pm UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/5 "2024-05-29T19:41:12Z")

</div>

Hello, leo! I have already solved the installation problem. But now I have another problem. I ran the program:

from inference import get\_roboflow\_model  
import supervision as sv  
import cv2  
image\_file = “10.jpg”  
image = cv2.imread(image\_file)  
model = get\_roboflow\_model(model\_id=“screws2-wmnvv/1”)  
results = model.infer(image)  
detections = sv.Detections.from\_roboflow(results[0].dict(by\_alias=True,  
exclude\_none=True))  
if len(detections) == 10:  
print(“10 screws counted. Package ready to move on.”)  
else:  
print(len(detections), “screws counted. Package is not ready.”)

But now he swears that I didn’t write down the key.  
Unauthorized access to roboflow API - check API key. Visit [Authentication | Roboflow Docs](https://docs.roboflow.com/api-reference/authentication#retrieve-an-api-key) to learn how to retrieve one.

Where should I write it?

---

<div class="post-metadata">

### Author: ![leo](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/leo/32/2228_2.png) [@leo](https://discuss.roboflow.com/u/leo)
#### Post date: [June 3, 2024, 11:48pm UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/6 "2024-06-03T23:48:58Z")

</div>

Hey @Satoshi_Nakamoto

It looks like you didn’t include the API key necessary when initalizing a model.

You can declare your API key as an environment variable (`ROBOFLOW_API_KEY`) or include it within your model initialization:

```auto
model = get_roboflow_model(model_id=“screws2-wmnvv/1”, api_key="YOUR API KEY")

```

See more details here:

> **[Models: Fine-tuned - Roboflow Inference](https://inference.roboflow.com/quickstart/explore_models/#run-a-private-fine-tuned-model)**
>
> Scalable, on-device computer vision deployment.

---

<div class="post-metadata">

### Author: ![Satoshi\_Nakamoto](https://yyz1.discourse-cdn.com/flex029/user_avatar/discuss.roboflow.com/satoshi_nakamoto/32/4719_2.png) [@Satoshi\_Nakamoto](https://discuss.roboflow.com/u/Satoshi_Nakamoto)
#### Post date: [June 4, 2024, 10:41am UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/7 "2024-06-04T10:41:39Z")

</div>

Thank you!!! It helped me!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex029/uploads/roboflow1/original/1X/bb6edbfa56d0cf2ee603f061e9e09103502cc8cc.png) [@system](https://discuss.roboflow.com/u/system)
#### Post date: [June 11, 2024, 10:42am UTC](https://discuss.roboflow.com/t/not-installing-inference/5969/8 "2024-06-11T10:42:00Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
