LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-07-2023, 11:53 PM   #1
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268
Blog Entries: 6

Rep: Reputation: Disabled
[Artix] [py310] Setting up VEnv’s for a legacy Python required by SDXL WebUI


My system’s python is the most recent 3.12.x
But SDiff XL WebUI requires Python 3.10.x which is a legacy Python for my system
Are there guides to set up a virt env for such a legacy Python?
With my SDiff XL WebUI’s webui-user.sh written as below,
Code:
export GIT=git
export COMMANDLINE_ARGS='--use-cpu all --precision full --upcast-sampling --no-half --medvram --disable-nan-check --xformers --enable-insecure-extension-access'
export TORCH_COMMAND='pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/rocm5.7'
export ACCELERATE=True
export NO_TCMALLOC=True
export LAUNCH_SCRIPT=launch.py
clone_dir=WebUI
install_dir=/opt/local/.A/SDXL
python_cmd=./py310/install-sh
venv_dir=./py310/Lib/venv/scripts/common/activate
Code:
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on hd_scania user
################################################################

################################################################
Experimental support for Renoir: make sure to have at least 4GB of VRAM and 10GB of RAM or enable cpu mode: --use-cpu all --no-half
################################################################

################################################################
ERROR: python3-venv is not installed, aborting...
################################################################

Last edited by hd_scania; 10-08-2023 at 05:10 AM.
 
Old 10-09-2023, 09:10 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
you need to install python3.10 and just create a venv (as usual), that should work.
 
Old 10-10-2023, 08:46 PM   #3
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
How to redirect the libs to a specific legacy Python version in order to install PyTorch for SDiff XL?
Code:
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on hd_scania user
################################################################

################################################################
Experimental support for Renoir: make sure to have at least 4GB of VRAM and 10GB of RAM or enable cpu mode: --use-cpu all --no-half
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Accelerating launch.py...
################################################################
2023-10-11 09:52:26.838501: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
/usr/lib/python3.11/site-packages/h5py/__init__.py:36: UserWarning: h5py is running against HDF5 1.14.2 when it was built against 1.14.1, this may cause problems
  _warn(("h5py is running against HDF5 {0} when it was built against {1}, "
[09:52:29] WARNING  The following values were not passed to `accelerate launch` and had defaults used instead:                                                        launch.py:895
                            `--num_processes` was set to a value of `0`                                                                                                            
                            `--num_machines` was set to a value of `1`                                                                                                             
                            `--mixed_precision` was set to a value of `'no'`                                                                                                       
                            `--dynamo_backend` was set to a value of `'no'`                                                                                                        
                    To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.                                                        
Python 3.11.5 (main, Sep  2 2023, 18:29:07) [GCC 13.2.1 20230801]
Version: v1.6.0
Commit hash: 5ef669de080814067961f28357256e8fe27544f4
Installing torch and torchvision
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Traceback (most recent call last):
  File "/opt/local/.A/SDXL/WebUI/launch.py", line 48, in <module>
    main()
  File "/opt/local/.A/SDXL/WebUI/launch.py", line 39, in main
    prepare_environment()
  File "/opt/local/.A/SDXL/WebUI/modules/launch_utils.py", line 352, in prepare_environment
    run(f'"{python}" -m {torch_command}', "Installing torch and torchvision", "Couldn't install torch", live=True)
  File "/opt/local/.A/SDXL/WebUI/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install torch.
Command: "/usr/bin/python" -m pip install torch torchvision --extra-index-url https://download.pytorch.org/whl/nightly/rocm5.1.1 python launch.py
Error code: 1
╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/bin/accelerate:8 in <module>                                                                │
│                                                                                                  │
│   5 from accelerate.commands.accelerate_cli import main                                          │
│   6 if __name__ == "__main__":                                                                   │
│   7 │   sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])                         │
│ ❱ 8 │   sys.exit(main())                                                                         │
│   9                                                                                              │
│                                                                                                  │
│ /usr/lib/python3.11/site-packages/accelerate/commands/accelerate_cli.py:45 in main               │
│                                                                                                  │
│   42 │   │   exit(1)                                                                             │
│   43 │                                                                                           │
│   44 │   # Run                                                                                   │
│ ❱ 45 │   args.func(args)                                                                         │
│   46                                                                                             │
│   47                                                                                             │
│   48 if __name__ == "__main__":                                                                  │
│                                                                                                  │
│ /usr/lib/python3.11/site-packages/accelerate/commands/launch.py:923 in launch_command            │
│                                                                                                  │
│   920 │   elif defaults is not None and defaults.compute_environment == ComputeEnvironment.AMA   │
│   921 │   │   sagemaker_launcher(defaults, args)                                                 │
│   922 │   else:                                                                                  │
│ ❱ 923 │   │   simple_launcher(args)                                                              │
│   924                                                                                            │
│   925                                                                                            │
│   926 def main():                                                                                │
│                                                                                                  │
│ /usr/lib/python3.11/site-packages/accelerate/commands/launch.py:579 in simple_launcher           │
│                                                                                                  │
│   576 │   process.wait()                                                                         │
│   577 │   if process.returncode != 0:                                                            │
│   578 │   │   if not args.quiet:                                                                 │
│ ❱ 579 │   │   │   raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)    │
│   580 │   │   else:                                                                              │
│   581 │   │   │   sys.exit(1)                                                                    │
│   582                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['/usr/bin/python', 'launch.py']' returned non-zero exit status 1.
 
Old 10-10-2023, 08:48 PM   #4
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
I have a legacy Python installed already but what i expect is how to redirect those libs for SDiff XL to that legacy Python version
Quote:
Originally Posted by pan64 View Post
you need to install python3.10 and just create a venv (as usual), that should work.
 
Old 10-11-2023, 01:12 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
you need to create a venv using python 3.10 and you need to use that vm to run your app.
 
1 members found this post helpful.
Old 10-20-2023, 10:57 PM   #6
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
And how to install ‘‘Clip’’ Python app for exactly that legacy Python used for the SDiff AI app (instead of the default newer Python used for system wide)?
Code:
Installing clip
Traceback (most recent call last):
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/launch.py", line 48, in <module>
    main()
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/launch.py", line 39, in main
    prepare_environment()
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/modules/launch_utils.py", line 363, in prepare_environment
    run_pip(f"install {clip_package}", "clip")
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/modules/launch_utils.py", line 138, in run_pip
    return run(f'"{python}" -m pip {command} --prefer-binary{index_url_line}', desc=f"Installing {desc}", errdesc=f"Couldn't install {desc}", live=live)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/modules/launch_utils.py", line 115, in run
    raise RuntimeError("\n".join(error_bits))
RuntimeError: Couldn't install clip.
Command: "/usr/bin/python" -m pip install https://github.com/openai/CLIP/archive/d50d76daa670286dd6cacf3bcd80b5e4823fc8e1.zip --prefer-binary
Error code: 1
stderr: error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Arch-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.
    
    If you wish to install a non-Arch packaged Python application,
    it may be easiest to use 'pipx install xyz', which will manage a
    virtual environment for you. Make sure you have python-pipx
    installed via pacman.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮
│ /usr/bin/accelerate:8 in <module>                                                                │
│                                                                                                  │
│   5 from accelerate.commands.accelerate_cli import main                                          │
│   6 if __name__ == "__main__":                                                                   │
│   7 │   sys.argv[0] = re.sub(r"(-script\.pyw|\.exe)?$", "", sys.argv[0])                         │
│ ❱ 8 │   sys.exit(main())                                                                         │
│   9                                                                                              │
│                                                                                                  │
│ /usr/lib/python3.11/site-packages/accelerate/commands/accelerate_cli.py:45 in main               │
│                                                                                                  │
│   42 │   │   exit(1)                                                                             │
│   43 │                                                                                           │
│   44 │   # Run                                                                                   │
│ ❱ 45 │   args.func(args)                                                                         │
│   46                                                                                             │
│   47                                                                                             │
│   48 if __name__ == "__main__":                                                                  │
│                                                                                                  │
│ /usr/lib/python3.11/site-packages/accelerate/commands/launch.py:923 in launch_command            │
│                                                                                                  │
│   920 │   elif defaults is not None and defaults.compute_environment == ComputeEnvironment.AMA   │
│   921 │   │   sagemaker_launcher(defaults, args)                                                 │
│   922 │   else:                                                                                  │
│ ❱ 923 │   │   simple_launcher(args)                                                              │
│   924                                                                                            │
│   925                                                                                            │
│   926 def main():                                                                                │
│                                                                                                  │
│ /usr/lib/python3.11/site-packages/accelerate/commands/launch.py:579 in simple_launcher           │
│                                                                                                  │
│   576 │   process.wait()                                                                         │
│   577 │   if process.returncode != 0:                                                            │
│   578 │   │   if not args.quiet:                                                                 │
│ ❱ 579 │   │   │   raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)    │
│   580 │   │   else:                                                                              │
│   581 │   │   │   sys.exit(1)                                                                    │
│   582                                                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
CalledProcessError: Command '['/usr/bin/python', 'launch.py']' returned non-zero exit status 1.
 
Old 10-21-2023, 04:05 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
did you create a python VM ?
 
Old 11-07-2023, 04:54 PM   #8
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
A virtual machine tailored for that legacy Python version? Never was aware of that
Quote:
Originally Posted by pan64 View Post
did you create a python VM ?
 
Old 11-08-2023, 01:37 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
this is a python vm. I gave you a link about it in post #5. Not that difficult.
Python, perl, java and probably other languages makes their own virtual machines when you start them. These are something like a mini os inside the application.
 
Old 11-08-2023, 06:10 AM   #10
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
With everything well set up esp the VEnv i've set up for that legacy Pyhton release, it still has errors with activating and connecting to that SDiff WebUI written by AUTOMATIC1111@GHub
He especially told us PyTorch his Git project uses still requires a legacy Python
But he never has told us what should be used instead of PyTorch for a decent Python release
Code:
asrock-amd-main-os:[hd_scania]:/opt/local/.A/SDXL/WebUI_XL-1.6.0$ l
total 527
-rwxr-xr-x  1 hd_scania root      420577 Aug 31 12:38 screenshot.png
-rwxr-xr-x  1 hd_scania root       35240 Aug 31 12:38 LICENSE.txt
-rwxr-xr-x  1 hd_scania root       33515 Aug 31 12:38 CHANGELOG.md
-rwxr-xr-x  1 hd_scania root       21496 Aug 31 12:38 style.css
-rwxr-xr-x  1 hd_scania root       11860 Aug 31 12:38 README.md
-rwxr-xr-x  1 hd_scania root        8098 Aug 31 12:38 webui.sh
-rwxr-xr-x  1 hd_scania root        5471 Aug 31 12:38 webui.py
-rwxr-xr-x  1 hd_scania root        4736 Aug 31 12:38 script.js
-rwxr-xr-x  1 hd_scania root        3382 Aug 31 12:38 .eslintrc.js
-rwxr-xr-x  1 hd_scania root        1297 Aug 31 12:38 launch.py
-rwxr-xr-x  1 hd_scania root         763 Aug 31 12:38 pyproject.toml
-rwxr-xr-x  1 hd_scania root         657 Aug 31 12:38 CODEOWNERS
-rwxr-xr-x  1 hd_scania hd_scania    603 Oct 21 11:57 webui-user.sh
-rwxr-xr-x  1 hd_scania root         541 Aug 31 12:38 requirements_versions.txt
-rwxr-xr-x  1 hd_scania root         360 Aug 31 12:38 requirements.txt
-rwxr-xr-x  1 hd_scania root         243 Aug 31 12:38 CITATION.cff
-rwxr-xr-x  1 hd_scania root         185 Aug 31 12:38 package.json
-rwxr-xr-x  1 hd_scania root         167 Aug 31 12:38 environment-wsl2.yaml
drwxr-xr-x  9 hd_scania root         125 Oct 21 11:54 modules
-rwxr-xr-x  1 hd_scania root         119 Aug 31 12:38 .pylintrc
-rw-r--r--  1 hd_scania hd_scania     59 Oct 21 12:26 .src.log
-rwxr-xr-x  1 hd_scania root          49 Aug 31 12:38 requirements-test.txt
-rwxr-xr-x  1 hd_scania root          48 Aug 31 12:38 .eslintignore
drwxr-xr-x 16 hd_scania root          38 Oct 21 13:17 .
drwxr-xr-x  2 hd_scania root          26 Oct  8 12:03 javascript
drwxr-xr-x  2 hd_scania hd_scania     20 Oct 21 11:45 .pyshm
drwxr-xr-x  2 hd_scania root          14 Oct  8 12:03 scripts
drwxr-xr-x 10 hd_scania root          10 Oct  8 12:03 extensions-builtin
drwxr-xr-x  7 hd_scania hd_scania     10 Oct 21 11:58 .git
drwxr-xr-x  3 hd_scania root           9 Oct  8 12:03 test
drwxr-xr-x  7 hd_scania root           8 Oct 21 11:25 ..
drwxr-xr-x  2 hd_scania root           8 Oct  8 12:03 textual_inversion_templates
drwxr-xr-x  2 hd_scania root           7 Oct  8 12:03 html
drwxr-xr-x  7 hd_scania root           7 Oct  8 12:03 models
drwxr-xr-x  2 hd_scania root           6 Oct  8 12:03 configs
drwxr-xr-x  6 hd_scania hd_scania      6 Oct 21 11:16 .py3106
drwxr-xr-x  2 hd_scania root           3 Oct 21 13:19 embeddings
drwxr-xr-x  2 hd_scania root           3 Oct 21 13:19 extensions
asrock-amd-main-os:[hd_scania]:/opt/local/.A/SDXL/WebUI_XL-1.6.0$ bash ./.src.log && bash ./webui.sh

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)                                                                                                                                                             
################################################################

################################################################
Running on hd_scania user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Experimental support for Renoir: make sure to have at least 4GB of VRAM and 10GB of RAM or enable cpu mode: --use-cpu all --no-half
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
ERROR: Cannot activate python venv, aborting...
################################################################
asrock-amd-main-os:[hd_scania]:/opt/local/.A/SDXL/WebUI_XL-1.6.0$
Quote:
Originally Posted by pan64 View Post
this is a python vm. I gave you a link about it in post #5. Not that difficult.
Python, perl, java and probably other languages makes their own virtual machines when you start them. These are something like a mini os inside the application.
 
Old 11-08-2023, 07:45 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
Sorry, I don't know why did it happen. Did you create that python venv? Does it work? Did you configure your webui to use that venv?
 
Old 11-26-2023, 06:14 PM   #12
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
That Python VEnv was created with the py3106 installation as individual dirs, and that WebUI has been configured for use of that VEnx and here below is my WebUI-user.sh,
Code:
export GIT=git
export COMMANDLINE_ARGS='--use-cpu all --num_processes 11 --num_machines 1 --medvram --no-half --upcast-sampling --precision full --skip-torch-cuda-test --disable-nan-check --xformers --enable-insecure-extension-access --mixed_precision yes --dynamo_backend no'
export TORCH_COMMAND='./.py3106/bin/pip3 install torch torchvision --extra-index-url https://download.pytorch.org/libtorch/nightly/rocm5.7/libtorch-cxx11-abi-shared-with-deps-latest.zip ./.py3106/bin/python3.10 launch.py'
export ACCELERATE=True
export NO_TCMALLOC=True
export LAUNCH_SCRIPT=launch.py
clone_dir=WebUI_XL-1.6.0
install_dir=/opt/local/.A/SDXL
python_cmd=./.py3106/bin/python3.10
venv_dir=./venv
And that's an SDiff WebUI Git project by AUTOMATIC1111 on GHub but he never has mentioned anything for the current Python with not requiring PyTprch to function his own SDiff WebUI
https://github.com/AUTOMATIC1111/stable-diffusion-webui His works are now unfortunately dormant since this August
Quote:
Originally Posted by pan64 View Post
Sorry, I don't know why did it happen. Did you create that python venv? Does it work? Did you configure your webui to use that venv?

Last edited by hd_scania; 11-26-2023 at 06:49 PM.
 
Old 11-26-2023, 06:17 PM   #13
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
Still errors with showing Python version conflicts, SDiff requires a legacy Python but the system's one is most recent
Code:
% bash webui.sh
Traceback (most recent call last):
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/launch.py", line 48, in <module>
    main()
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/launch.py", line 44, in main
    start()
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/modules/launch_utils.py", line 432, in start
    import webui
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/webui.py", line 13, in <module>
    initialize.imports()
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/modules/initialize.py", line 21, in imports
    import gradio  # noqa: F401
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/gradio/__init__.py", line 3, in <module>
    import gradio.components as components
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/gradio/components/__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/gradio/components/annotated_image.py", line 12, in <module>
    from gradio import utils
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/gradio/utils.py", line 353, in <module>
    class AsyncRequest:
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/gradio/utils.py", line 372, in AsyncRequest
    client = httpx.AsyncClient()
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/httpx/_client.py", line 1397, in __init__
    self._transport = self._init_transport(
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/httpx/_client.py", line 1445, in _init_transport
    return AsyncHTTPTransport(
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/httpx/_transports/default.py", line 275, in __init__
    self._pool = httpcore.AsyncConnectionPool(
TypeError: AsyncConnectionPool.__init__() got an unexpected keyword argument 'socket_options'
Traceback (most recent call last):
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main

  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/accelerate/commands/launch.py", line 994, in launch_command
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/lib/python3.10/site-packages/accelerate/commands/launch.py", line 636, in simple_launcher
    current_env = prepare_multi_gpu_env(args)
subprocess.CalledProcessError: Command '['/opt/local/.A/SDXL/WebUI_XL-1.6.0/venv/bin/python3.10', 'launch.py']' returned non-zero exit status 1.

Last edited by hd_scania; 11-26-2023 at 06:51 PM.
 
Old 11-27-2023, 12:28 AM   #14
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,004

Rep: Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338Reputation: 7338
based on this: https://github.com/AUTOMATIC1111/sta...i/issues/13847
or this: https://github.com/AUTOMATIC1111/sta...i/issues/13236
you need to specify the version of httpx. It looks like the current version is buggy.
Otherwise good progress, it looks like your venv is ok.
 
1 members found this post helpful.
Old 11-27-2023, 06:08 PM   #15
hd_scania
Member
 
Registered: Apr 2017
Location: Nowhere
Distribution: Plenties found in my signatures :)
Posts: 268

Original Poster
Blog Entries: 6

Rep: Reputation: Disabled
requirements.txt
Code:
GitPython
Pillow
accelerate
basicsr
blendmodes
clean-fid
einops
fastapi>=0.90.1
gfpgan
gradio==3.41.2
httpcore>=1.0.0
httpx>=0.25.1
inflection
jsonmerge
kornia
lark
numpy
omegaconf
open-clip-torch
piexif
psutil
pytorch_lightning
realesrgan
requests
resize-right
safetensors
scikit-image>=0.19
timm
tomesd
torch
torchdiffeq
torchsde
transformers==4.30.2
requirements_versions.txt
Code:
GitPython==3.1.32
Pillow==9.5.0
accelerate>=0.21.0
basicsr==1.4.2
blendmodes==2022
clean-fid==0.1.35
einops==0.4.1
fastapi==0.94.0
gfpgan==1.3.8
gradio==3.41.2
httpcore>=1.0.0
httpx>=0.25.1
inflection==0.5.1
jsonmerge==1.8.0
kornia==0.6.7
lark==1.1.2
numpy==1.23.5
omegaconf==2.2.3
open-clip-torch==2.20.0
piexif==1.1.3
psutil==5.9.5
pytorch_lightning==1.9.4
realesrgan==0.3.0
resize-right==0.0.2
safetensors>=0.3.1
scikit-image==0.21.0
timm==0.9.2
tomesd==0.1.3
torch
torchdiffeq==0.2.3
torchsde==0.2.5
transformers==4.30.2
Backtraces (Python 3.10.6 errors)
Code:
Traceback (most recent call last):
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/.py3106/.VEnv3106/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/.py3106/.VEnv3106/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 45, in main
    args.func(args)
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/.py3106/.VEnv3106/lib/python3.10/site-packages/accelerate/commands/launch.py", line 979, in launch_command
    simple_launcher(args)
  File "/opt/local/.A/SDXL/WebUI_XL-1.6.0/.py3106/.VEnv3106/lib/python3.10/site-packages/accelerate/commands/launch.py", line 628, in simple_launcher
    raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/opt/local/.A/SDXL/WebUI_XL-1.6.0/.py3106/.VEnv3106/bin/python3.10', 'launch.py']' returned non-zero exit status 2.

Last edited by hd_scania; 11-27-2023 at 06:36 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] pycharm, /path/to/project/venv/bin/python does not exist kaz2100 Linux - Software 0 08-24-2022 08:48 AM
LXer: Setting up PostgreSQL 13.2&&Python VENV verified by another PyQT5 module on Debian Bullseye LXer Syndicated Linux News 0 06-11-2021 05:39 AM
LXer: How to create virtual environments in Python 3 with venv module LXer Syndicated Linux News 0 03-23-2021 04:56 AM
venv, pyvenv, pyenv, virtualenv - the setup of Python on a Linux rincon Linux - General 3 01-01-2021 12:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration