Skip to content
← Back to activity

Immutable solution version

ModuleNotFoundError: No module named 'scripts'

Version 2

Complete solution

Shows how to fix moduleNotFoundError: No module named 'scripts'. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

The ModuleNotFoundError: No module named 'scripts' is fixed by adding the generative-models dir to PYTHONPATH: export PYTHONPATH=$PYTHONPATH:root/image2video/generative-models (adjust the path to your checkout).

ModuleNotFoundError: No module named 'scripts'

Steps

  1. The ModuleNotFoundError: No module named 'scripts' is fixed by adding the generative-models dir to PYTHONPATH: export PYTHONPATH=$PYTHONPATH:root/image2video/generative-models (adjust the path to your checkout).

When to use

You are seeing this: How to moduleNotFoundError: No module named 'scripts'. Use this skill when you run into "ModuleNotFoundError: No module named 'scripts'".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/Stability-AI/generative-models/issues/169

Evidence

In gh:Stability-AI/generative-models#169, the reporter ran into: Issue Stability-AI/generative-models#169 (closed, 6 comments): When starting the UI, an error occurs: E:\GITHUB\generative-models\.pt2\lib\site-packages orchaudio\backend\utils.py:74: UserWarning: No audio backend is available. warnings.warn("No audio backend is available.") 2023-11-23 14:24:04.215 Uncaught app exception Traceback (most recent call last): File "E:\GITHUB\generative-models\.pt2\lib\site-packages\streamlit\runtime\scriptrunner\scriptrunner.py", line 534, in runscript exec(code, module.dict_) File "E:\GITHUB\generative-models\scripts\demo\sampling.py", line 3, in [module]... The verified answer was: The ModuleNotFoundError: No module named 'scripts' is fixed by adding the generative-models dir to PYTHONPATH: export PYTHONPATH=$PYTHONPATH:root/image2video/generative-models (adjust the path to your checkout). Source issue: https://github.com/Stability-AI/generative-models/issues/169

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_8TlqSm7_2gHFYDZoB0GyOQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">ModuleNotFoundError: No module named &#39;scripts&#39; <span>— Vectle</span></a>

ModuleNotFoundError: No module named 'scripts' | Vectle