carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.81k stars 426 forks source link

dependencies #48

Closed 28012804 closed 2 years ago

28012804 commented 2 years ago

_I've tried 4 different times to install, ive reinstalled both blender and the addon and each time it gets a decent way through before getting stuck

i have found this type of error while downloading dream addon on blender_ Read prefs: C:\Users\dkver\AppData\Roaming\Blender Foundation\Blender\3.3\config\userpref.blend Reloading external rigs... RRead prefs: C:\Users\dkver\AppData\Roaming\Blender Foundation\Blender\3.3\config\userpref.blend Reloading external rigs... Reloading external metarigs... pip 21.2.4 from C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\site-packages\pip (python 3.10) Traceback (most recent call last): File "C:\Users\dkver\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dream-textures-main\operators\install_dependencies.py", line 141, in execute install_and_import_requirements(requirements_txt=context.scene.dream_textures_requirements_path) File "C:\Users\dkver\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dream-textures-main\operators\install_dependencies.py", line 115, in install_and_import_requirements python_devel_tgz.extractall(path=python_include_dir, members=members(python_devel_tgz)) File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\tarfile.py", line 2040, in extractall self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(), File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\tarfile.py", line 2081, in extract self._extract_member(tarinfo, os.path.join(path, tarinfo.name), File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\tarfile.py", line 2146, in _extract_member os.makedirs(upperdirs) File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\os.py", line 225, in makedirs mkdir(name, mode) PermissionError: [WinError 5] Access is denied: 'C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\Include' Error: Python: Traceback (most recent call last): File "C:\Users\dkver\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dream-textures-main\operators\install_dependencies.py", line 141, in execute install_and_import_requirements(requirements_txt=context.scene.dream_textures_requirements_path) File "C:\Users\dkver\AppData\Roaming\Blender Foundation\Blender\3.3\scripts\addons\dream-textures-main\operators\install_dependencies.py", line 115, in install_and_import_requirements python_devel_tgz.extractall(path=python_include_dir, members=members(python_devel_tgz)) File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64__ppwjx1n5r4v9t\Blender\3.3\python\lib\tarfile.py", line 2040, in extractall self.extract(tarinfo, path, set_attrs=not tarinfo.isdir(), File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\tarfile.py", line 2081, in extract self._extract_member(tarinfo, os.path.join(path, tarinfo.name), File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\tarfile.py", line 2146, in _extract_member os.makedirs(upperdirs) File "C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\lib\os.py", line 225, in makedirs mkdir(name, mode) PermissionError: [WinError 5] Access is denied: 'C:\Program Files\WindowsApps\BlenderFoundation.Blender_3.3.0.0_x64ppwjx1n5r4v9t\Blender\3.3\python\Include'

carson-katri commented 2 years ago

If you downloaded blender from the Windows Store, can you try again with the installer from blender.org?

carson-katri commented 2 years ago

Also, make sure you run blender as an administrator when installing

TroySeins commented 2 years ago

MacOS here, same problems. What is different on this installation compared to all the other plugins that we need other permissions?

carson-katri commented 2 years ago

@TroySeins This addon has dependencies on various machine learning packages, and to build some of them you need some header files in your Python installation. On some system you install something like python-devel to get them, but blender does not ship with them. So admin rights are needed to put these header files into the blender installation.

Most addons do not have complex external dependencies.

TroySeins commented 2 years ago

Most addons do not have complex external dependencies.

Thank you for the fast answer. Solving the issue was easy, just changing the permissions for the complete Contents directory in the app container, this allowed for the dependencies to get installed.

carson-katri commented 2 years ago

@TroySeins nice, glad you got it installed. Hopefully in the future all the dependencies can be packaged into the addon.

Tiziano-Berti commented 2 years ago

Hi @carson-katri, thank you for the amazing plugin, looking forward to be able to test it! I have an issue installing the dependency BasicSr, I'm running blender in administrator mode on a Win10 machine.

`Collecting basicsr>=1.4.2 Downloading basicsr-1.4.2.tar.gz (172 kB) |████████████████████████████████| 172 kB ... ERROR: Command errored out with exit status 1: command: 'C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\bin\python.EXE' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\TIZIANO\AppData\Local\Temp\pip-install-kw3qcjs9\basicsr_560d65646c394aa5adec07c11a4bcff6\setup.py'"'"'; file='"'"'C:\Users\TIZIANO\AppData\Local\Temp\pip-install-kw3qcjs9\basicsr_560d65646c394aa5adec07c11a4bcff6\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\TIZIANO\AppData\Local\Temp\pip-pip-egg-info-1pj8wc4z' cwd: C:\Users\TIZIANO\AppData\Local\Temp\pip-install-kw3qcjs9\basicsr_560d65646c394aa5adec07c11a4bcff6\ Complete output (32 lines): WARNING: The wheel package is not available. Traceback (most recent call last): File "", line 1, in File "C:\Users\TIZIANO\AppData\Local\Temp\pip-install-kw3qcjs9\basicsr_560d65646c394aa5adec07c11a4bcff6\setup.py", line 147, in setup( File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools__init__.py", line 152, in setup _install_setup_requires(attrs) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools__init.py", line 147, in _install_setup_requires dist.fetch_build_eggs(dist.setup_requires) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools\dist.py", line 806, in fetch_build_eggs resolved_dists = pkg_resources.working_set.resolve( File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\pkg_resources\init.py", line 766, in resolve dist = best[req.key] = env.best_match( File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\pkg_resources\init.py", line 1051, in best_match return self.obtain(req, installer) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\pkg_resources\init__.py", line 1063, in obtain return installer(requirement) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools\dist.py", line 877, in fetch_build_egg return fetch_build_egg(self, req) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools\installer.py", line 80, in fetch_build_egg wheel.install_as_egg(dist_location) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools\wheel.py", line 95, in install_as_egg self._install_as_egg(destination_eggdir, zf) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools\wheel.py", line 103, in _install_as_egg self._convert_metadata(zf, destination_eggdir, dist_info, egg_info) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\site-packages\setuptools\wheel.py", line 125, in _convert_metadata zf.extractall(destination_eggdir) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\zipfile.py", line 1634, in extractall self._extract_member(zipinfo, path, pwd) File "C:\Program Files\Blender Foundation\Blender 3.3\3.3\python\lib\zipfile.py", line 1688, in _extract_member open(targetpath, "wb") as target: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\TIZIANO\AppData\Local\Temp\pip-install-kw3qcjs9\basicsr_560d65646c394aa5adec07c11a4bcff6\.eggs\torch-1.12.1-py3.10-win-amd64.egg\caffe2\python\serialized_test\data\operator_test\piecewise_linear_transform_test.test_multi_predictions_params_from_arg.zip'

WARNING: Discarding https://files.pythonhosted.org/packages/86/41/00a6b000f222f0fa4c6d9e1d6dcc9811a374cabb8abb9d408b77de39648c/basicsr-1.4.2.tar.gz#sha256=b89b595a87ef964cda9913b4d99380ddb6554c965577c0c10cb7b78e31301e87 (from https://pypi.org/simple/basicsr/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.`

Tiziano-Berti commented 2 years ago

Sorry i've just seen that you already placed the answer in the plugin preferencies FAQ, I'll test it soon :) immagine