intel / openvino-ai-plugins-gimp

GIMP AI plugins with OpenVINO Backend
Apache License 2.0
447 stars 49 forks source link

help with windows installation #33

Closed jfsunx closed 1 year ago

jfsunx commented 1 year ago

I encountered a problem during the installation. The output in CMD is as follows

Using cached scikit-learn-0.24.2.tar.gz (7.5 MB)

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' Preparing metadata (pyproject.toml): started Preparing metadata (pyproject.toml): finished with status 'error' error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [54 lines of output]

:17: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html Partial import of sklearn during the build process. :116: DeprecationWarning: `numpy.distutils` is deprecated since NumPy 1.23.0, as a result of the deprecation of `distutils` itself. It will be removed for Python >= 3.12. For older Python versions it will remain present. It is recommended to use `setuptools < 60.0` for those Python versions. For more details, see: https://numpy.org/devdocs/reference/distutils_status_migration.html INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils Traceback (most recent call last): File "C:\Users\FF\model_conv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in main() File "C:\Users\FF\model_conv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\Users\FF\model_conv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 149, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\setuptools\build_meta.py", line 380, in prepare_metadata_for_build_wheel self.run_setup() File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup super(_BuildMetaLegacyBackend, File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 301, in File "", line 297, in setup_package File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup config = configuration() File "", line 188, in configuration File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1050, in add_subpackage config_list = self.get_subpackage(subpackage_name, subpackage_path, File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1016, in get_subpackage config = self._get_configuration_from_setup_py( File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 958, in _get_configuration_from_setup_py config = setup_module.configuration(*args) File "C:\Users\FF\AppData\Local\Temp\pip-install-j6t1n5an\scikit-learn_be3f5e0e7917495dbf0464aa8fe4b471\sklearn\setup.py", line 83, in configuration cythonize_extensions(top_path, config) File "C:\Users\FF\AppData\Local\Temp\pip-install-j6t1n5an\scikit-learn_be3f5e0e7917495dbf0464aa8fe4b471\sklearn\_build_utils\__init__.py", line 45, in cythonize_extensions basic_check_build() File "C:\Users\FF\AppData\Local\Temp\pip-install-j6t1n5an\scikit-learn_be3f5e0e7917495dbf0464aa8fe4b471\sklearn\_build_utils\pre_build_helpers.py", line 106, in basic_check_build compile_test_program(code) File "C:\Users\FF\AppData\Local\Temp\pip-install-j6t1n5an\scikit-learn_be3f5e0e7917495dbf0464aa8fe4b471\sklearn\_build_utils\pre_build_helpers.py", line 66, in compile_test_program ccompiler.compile(['test_program.c'], output_dir='objects', File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 343, in compile self.initialize() File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\setuptools\_distutils\_msvccompiler.py", line 253, in initialize vc_env = _get_vc_env(plat_spec) File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\setuptools\msvc.py", line 214, in msvc14_get_vc_env return _msvc14_get_vc_env(plat_spec) File "C:\Users\FF\AppData\Local\Temp\pip-build-env-t9csv8s1\overlay\Lib\site-packages\setuptools\msvc.py", line 168, in _msvc14_get_vc_env raise distutils.errors.DistutilsPlatformError( distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/ [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details.
arisha07 commented 1 year ago

Hi, what version of python do you have on your system ? You can do "python -V" in your CMD.

jfsunx commented 1 year ago

Thank you. The version is Python 3.10.10, by Anaconda.

arisha07 commented 1 year ago

Can you try this :

Download a Python installer from python.org. Choose Python 3.8/3.9 /3.10 and make sure to pick a 64 bit version. For example, this 3.8 installer: https://www.python.org/ftp/python/3.8.8/python-3.8.8-amd64.exe Double click on the installer to run it, and follow the steps in the installer. Check the box to add Python to your PATH, and to install py. At the end of the installer, there is an option to disable the PATH length limit. It is recommended to click this

espio999 commented 1 year ago

Hello

I focuse the last line,

"Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"

Do you install Visual Studio or C++ Build tools? Some components are compiled during installing process and they are used for it.

And you are using Anaconda. Don't forget to appropriately edit "install.bat". "openvino-ai-plugins-gimp" trys to install itself with Python virtual environment. Mixed use of pip and conda is the source of trouble regardless of "openvino-ai-plugins-gimp".

FYI, this is my way. I used Python provided at Microsoft Store. https://impsbl.hatenablog.jp/entry/StableDiffusionOnWindowsPCwith8GB-RAM_GIMP_en

arisha07 commented 1 year ago

Hello

I focuse the last line,

"Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/"

Do you install Visual Studio or C++ Build tools? Some components are compiled during installing process and they are used for it.

And you are using Anaconda. Don't forget to appropriately edit "install.bat". "openvino-ai-plugins-gimp" trys to install itself with Python virtual environment. Mixed use of pip and conda is the source of trouble regardless of "openvino-ai-plugins-gimp".

FYI, this is my way. I used Python provided at Microsoft Store. https://impsbl.hatenablog.jp/entry/StableDiffusionOnWindowsPCwith8GB-RAM_GIMP_en

There are some major changes made to the install.bat - It now includes automatic weight copy and stable-diffusion-1.4 & 1.5 model conversions etc. Please make sure to use Python from python.org as the version of Python that is available in the Microsoft Store may require installation of additional packages to work well with OpenVINO tools.

jfsunx commented 1 year ago

Thank you for your reply. I reinstalled Python without using anaconda and it really works. Perhaps there is something wrong with my environment. Anyway, now I can use this amazing plugin.