generative-models
generative-models copied to clipboard
help! ModuleNotFoundError: No module named 'scripts.demo'
Traceback:
File "C:\DATA\generative-models.pt2\lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "C:\DATA\generative-models\scripts\demo\sampling.py", line 3, in
same on windows 10
Same on linux
set PYTHONPATH=.
that fixes it
Setting PYTHONPATH resolved the issue for me as well in Windows 11, but in case anyone else encounters this issue and is using PowerShell, the correct way to do so is as follows:
$ENV:PYTHONPATH=$PWD
This assumes that you're running this command from the generative-models repository directory, of course.
Setting PYTHONPATH resolved the issue for me as well in Windows 11, but in case anyone else encounters this issue and is using PowerShell, the correct way to do so is as follows:
$ENV:PYTHONPATH=$PWD
This assumes that you're running this command from the generative-models repository directory, of course.
This is great and I agree, but I recommend setting the python path to a fixed directory, (the long directory path to the repository)
Setting PYTHONPATH resolved the issue for me as well in Windows 11, but in case anyone else encounters this issue and is using PowerShell, the correct way to do so is as follows: $ENV:PYTHONPATH=$PWD This assumes that you're running this command from the generative-models repository directory, of course.
This is great and I agree, but I recommend setting the python path to a fixed directory, (the long directory path to the repository)
But how?)
PYTHONPATH=. streamlit run scripts/demo/video_sampling.py --server.port 8000
Setting PYTHONPATH resolved the issue for me as well in Windows 11, but in case anyone else encounters this issue and is using PowerShell, the correct way to do so is as follows:
$ENV:PYTHONPATH=$PWD
This assumes that you're running this command from the generative-models repository directory, of course.
THANKS!
PYTHONPATH=. streamlit run scripts/demo/video_sampling.py --server.port 8000
Setting PYTHONPATH resolved the issue for me as well in Windows 11, but in case anyone else encounters this issue and is using PowerShell, the correct way to do so is as follows:
$ENV:PYTHONPATH=$PWD
This assumes that you're running this command from the generative-models repository directory, of course.
THANK! it's working…
set PYTHONPATH=.
that fixes it I have also encountered this issue in the Linux system. How can I solve it
set PYTHONPATH=.
that fixes it
This work! on linux shell as : export PYTHONPATH=.
设置 PYTHONPATH 在 Windows 11 中也为我解决了这个问题,但如果其他人遇到此问题并且正在使用 PowerShell,正确的方法如下:
$ENV:PYTHONPATH=$PWD
当然,这假定您是从 generative-models 存储库目录运行此命令的。
What's going on with this, I don't quite understand whether it's running in "terminal" or "cmd"?Please help me