# Fresh install of DietPi, can't access any python modules

**URL:** https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203
**Category:** Troubleshooting
**Created:** [2 September 2022 11:51 UTC](https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203 "2022-09-02T11:51:08Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![reg\_ed](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/90db22/32.png) [@reg\_ed](https://dietpi.com/forum/u/reg_ed)
#### Post date: [2 September 2022 11:51 UTC](https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203/1 "2022-09-02T11:51:08Z")

</div>

I’m new to DietPi. I have a fresh install, fully updated on a RPI4. I’ve installed python3 using dietpi-software system.

I can’t access any modules, either installed using the module’s setup.py or installed using pip3. I just get ‘No module named ’ error.

I’m trying to run a python script that worked without issue on Raspbian Lite.

I’d appreciate any advice.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [2 September 2022 12:02 UTC](https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203/2 "2022-09-02T12:02:59Z")

</div>

Welcome to our community.

Can you share the command you are using to run your script.

---

<div class="post-metadata">

### Author: ![reg\_ed](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/90db22/32.png) [@reg\_ed](https://dietpi.com/forum/u/reg_ed)
#### Post date: [2 September 2022 12:17 UTC](https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203/3 "2022-09-02T12:17:46Z")

</div>

Thank you.

Yes absolutely. I am simply using:

sudo python3 myscript.py

(sudo because I call a library which needs root privileges at startup)

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [2 September 2022 12:29 UTC](https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203/4 "2022-09-02T12:29:29Z")

</div>

Did you tried to use full path to your script

```auto
sudo python3 /path/to/your/myscript.py

```

---

<div class="post-metadata">

### Author: ![reg\_ed](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/r/90db22/32.png) [@reg\_ed](https://dietpi.com/forum/u/reg_ed)
#### Post date: [2 September 2022 12:45 UTC](https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203/5 "2022-09-02T12:45:34Z")

</div>

Yeah, I’m calling my script which loads fine. The problem is when my script tries to import modules. Any module my script imports that was installed via pip3 or directly fails with ‘No module named \*\*\*\*\*’ error.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [3 September 2022 08:51 UTC](https://dietpi.com/forum/t/fresh-install-of-dietpi-cant-access-any-python-modules/14203/6 "2022-09-03T08:51:59Z")

</div>

It would be helpful if you could share some error message. Does your script is using an own user pyenv?
