What's new
AI Arts Forum :: Talking about Generative AI Art Tools

Whether you're already in love with Generative AI, just getting started, or wanting to learn more, you're in the right place!

Register for a FREE account today and join the conversation.

Stable Diffusion Sable Difusion WebUI, Assistance Needed with Python Package Installation Errors in Portable Setup (Installing ROOP Extension)

soliver84

New member
Hello Community,

I am seeking help with a specific issue I've encountered in my portable Python installation, particularly during the installation of the ROOP extension. Your insights and guidance would be immensely valuable.

Issue Description:I am using a portable setup located at C:\StableDifusionBilderbearbeiten\sd.webui\system\python. My current challenge arises when attempting to install the ROOP extension using an install.py script. This process consistently results in an error that prevents successful installation.

Error Encountered:The error manifests during the execution of install.py for the ROOP extension. The script tries to install dependencies from a requirements.txt file but fails, yielding the following error messages:

pythonCopy code
*** Error running install.py for extension C:\StableDifusionBilderbearbeiten\sd.webui\webui\extensions\sd-webui-roop.
*** Error code: 1
[...]
*** ModuleNotFoundError: No module named '_socket'
[...]
*** subprocess.CalledProcessError: Command '['pip', 'install', '-r', 'C:\\StableDifusionBilderbearbeiten\\sd.webui\\webui\\extensions\\sd-webui-roop\\requirements.txt']' returned non-zero exit status 2.
[...]

The error specifically highlights issues with the _socket module, and a failure in the subprocess module within the install.py script.

Attempts at Resolution:

  • Ensured correct setting of environment variables for Python.
  • Updated Pip and Setuptools to their latest versions.
  • Tried installing packages individually, but to no avail.
Considering this is a portable installation, a complete reinstallation of Python isn't feasible due to potential disruptions to the existing setup and dependencies.

Request for Help:If anyone has faced similar issues, especially in installing the ROOP extension in a portable Python environment, or if you have any suggestions on how to address these errors, your assistance would be greatly appreciated. I am particularly looking for solutions that can rectify the _socket module error and allow the install.py script to run successfully, without resorting to a complete Python reinstall.

Thank you for your time and any help you can provide.

Best regards,
Soliver84




LOG:
*** Error running install.py for extension C:\StableDifusionBilderbearbeiten\sd.webui\webui\extensions\sd-webui-roop.
*** Command: "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\python.exe" "C:\StableDifusionBilderbearbeiten\sd.webui\webui\extensions\sd-webui-roop\install.py"
*** Error code: 1
*** stdout: Collecting insightface==0.7.3 (from -r C:\StableDifusionBilderbearbeiten\sd.webui\webui\extensions\sd-webui-roop\requirements.txt (line 1))
*** Using cached insightface-0.7.3.tar.gz (439 kB)
*** Installing build dependencies: started
*** Installing build dependencies: finished with status 'done'
*** Getting requirements to build wheel: started
*** Getting requirements to build wheel: finished with status 'done'
***
*** stderr: ERROR: Exception:
*** Traceback (most recent call last):
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\cli\base_command.py", line 180, in exc_logging_wrapper
*** status = run_func(*args)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\cli\req_command.py", line 245, in wrapper
*** return func(self, options, args)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\commands\install.py", line 377, in run
*** requirement_set = resolver.resolve(
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 95, in resolve
*** result = self._result = resolver.resolve(
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
*** state = resolution.resolve(requirements, max_rounds=max_rounds)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
*** self._add_to_criteria(self.state.criteria, r, parent=None)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
*** if not criterion.candidates:
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
*** return bool(self._sequence)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
*** return any(self)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
*** return (c for c in iterator if id(c) not in self._incompatible_ids)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 47, in _iter_built
*** candidate = func()
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 182, in _make_candidate_from_link
*** base: Optional[BaseCandidate] = self._make_base_candidate_from_link(
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 228, in _make_base_candidate_from_link
*** self._link_candidate_cache[link] = LinkCandidate(
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 293, in __init__
*** super().__init__(
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 156, in __init__
*** self.dist = self._prepare()
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 225, in _prepare
*** dist = self._prepare_distribution()
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\resolution\resolvelib\candidates.py", line 304, in _prepare_distribution
*** return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\operations\prepare.py", line 525, in prepare_linked_requirement
*** return self._prepare_linked_requirement(req, parallel_builds)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\operations\prepare.py", line 640, in _prepare_linked_requirement
*** dist = _get_prepared_distribution(
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\operations\prepare.py", line 71, in _get_prepared_distribution
*** abstract_dist.prepare_distribution_metadata(
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\distributions\sdist.py", line 54, in prepare_distribution_metadata
*** self._install_build_reqs(finder)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\distributions\sdist.py", line 124, in _install_build_reqs
*** build_reqs = self._get_build_requires_wheel()
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\distributions\sdist.py", line 101, in _get_build_requires_wheel
*** return backend.get_requires_for_build_wheel()
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_internal\utils\misc.py", line 751, in get_requires_for_build_wheel
*** return super().get_requires_for_build_wheel(config_settings=cs)
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 166, in get_requires_for_build_wheel
*** return self._call_hook('get_requires_for_build_wheel', {
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_vendor\pyproject_hooks\_impl.py", line 321, in _call_hook
*** raise BackendUnavailable(data.get('traceback', ''))
*** pip._vendor.pyproject_hooks._impl.BackendUnavailable: Traceback (most recent call last):
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\system\python\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 77, in _build_backend
*** obj = import_module(mod_path)
*** File "importlib\__init__.py", line 126, in import_module
*** File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
*** File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
*** File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
*** File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
*** File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
*** File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
*** File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
*** File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
*** File "<frozen importlib._bootstrap_external>", line 883, in exec_module
*** File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
*** File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-fnhrv44t\overlay\Lib\site-packages\setuptools\__init__.py", line 13, in <module>
*** from . import version as _version_module
*** File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-fnhrv44t\overlay\Lib\site-packages\setuptools\version.py", line 1, in <module>
*** from ._importlib import metadata
*** File "C:\Users\Alex\AppData\Local\Temp\pip-build-env-fnhrv44t\overlay\Lib\site-packages\setuptools\_importlib.py", line 45, in <module>
*** import importlib.metadata as metadata # noqa: F401
*** File "importlib\metadata\__init__.py", line 17, in <module>
*** File "importlib\metadata\_adapters.py", line 3, in <module>
*** File "email\message.py", line 15, in <module>
*** File "email\utils.py", line 29, in <module>
*** File "socket.py", line 51, in <module>
*** ModuleNotFoundError: No module named '_socket'
***
*** Traceback (most recent call last):
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\webui\extensions\sd-webui-roop\install.py", line 27, in <module>
*** subprocess.run(["pip", "install", "-r", req_file], check=True)
*** File "subprocess.py", line 524, in run
*** subprocess.CalledProcessError: Command '['pip', 'install', '-r', 'C:\\StableDifusionBilderbearbeiten\\sd.webui\\webui\\extensions\\sd-webui-roop\\requirements.txt']' returned non-zero exit status 2.
***
*** During handling of the above exception, another exception occurred:
***
*** Traceback (most recent call last):
*** File "C:\StableDifusionBilderbearbeiten\sd.webui\webui\extensions\sd-webui-roop\install.py", line 29, in <module>
*** print(f"Failed to install requirements: {e.stderr.decode('utf-8')}")
*** AttributeError: 'NoneType' object has no attribute 'decode'
 
Back