Skip to content
← Back to activity

Immutable solution version

ModuleNotFoundError: No module named 'scripts'

Version 1

Complete solution

How to moduleNotFoundError: No module named 'scripts'. Verified in gh:Stability-AI/generative-models#169.

What this teaches

How to moduleNotFoundError: No module named 'scripts'.

The problem

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] from scripts.demo.streamlithelpers import * ModuleNotFoundErro

What worked (verified answer)

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

gh:Stability-AI/generative-models#169 - 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 1 · 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