Set the PYTHONPATH in the developer console, before the prompt shows up

This commit is contained in:
cmdr2 2022-11-24 11:48:27 +05:30
parent 8a0ec95fe1
commit b70235ff92
2 changed files with 21 additions and 0 deletions

View File

@ -29,6 +29,18 @@ call conda activate .\stable-diffusion\env
call where python call where python
call python --version call python --version
@rem set the PYTHONPATH
cd stable-diffusion
set SD_DIR=%cd%
cd env\lib\site-packages
set PYTHONPATH=%SD_DIR%;%cd%
cd ..\..\..
echo PYTHONPATH=%PYTHONPATH%
cd ..
@rem done
echo. echo.
cmd /k cmd /k

View File

@ -35,6 +35,15 @@ if [ "$0" == "bash" ]; then
which python which python
python --version python --version
# set the PYTHONPATH
cd stable-diffusion
SD_PATH=`pwd`
export PYTHONPATH="$SD_PATH:$SD_PATH/env/lib/python3.8/site-packages"
echo "PYTHONPATH=$PYTHONPATH"
cd ..
# done
echo "" echo ""
else else
file_name=$(basename "${BASH_SOURCE[0]}") file_name=$(basename "${BASH_SOURCE[0]}")