Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install DisplayCAL fails on Windows 11 with Python 3.11.4 #274

Closed
agjell opened this issue Jul 2, 2023 · 8 comments
Closed

pip install DisplayCAL fails on Windows 11 with Python 3.11.4 #274

agjell opened this issue Jul 2, 2023 · 8 comments

Comments

@agjell
Copy link

agjell commented Jul 2, 2023

C:\Users\dummyuser>pip install DisplayCAL
Collecting DisplayCAL
  Downloading DisplayCAL-3.9.11.tar.gz (10.6 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.6/10.6 MB 65.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      <string>:20: DeprecationWarning: 'msilib' is deprecated and slated for removal in Python 3.13
      Traceback (most recent call last):
        File "C:\Users\dummyuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\dummyuser\AppData\Local\Programs\Python\Python311\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\dummyuser\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\dummyuser\AppData\Local\Temp\pip-build-env-srjxy9eb\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\dummyuser\AppData\Local\Temp\pip-build-env-srjxy9eb\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "C:\Users\dummyuser\AppData\Local\Temp\pip-build-env-srjxy9eb\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 1583, in <module>
        File "<string>", line 446, in setup
        File "C:\Users\dummyuser\AppData\Local\Temp\pip-install-g_etflg2\displaycal_6922188531564c3c8a596774680dbf7b\DisplayCAL\util_os.py", line 53, in <module>
          from win32file import *
      ModuleNotFoundError: No module named 'win32file'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
@p5k369
Copy link
Collaborator

p5k369 commented Jul 3, 2023

Hey @agjell note that installing and running displaycal on windows is atm not truly supported. You would have to make changes to several files just in order to make displaycal start on windows and even then you would not be able to perform a calibration.

Independently of that, the error comes from the missing package pywin32. This can be solved by pip install pywin32

@agjell
Copy link
Author

agjell commented Jul 3, 2023

Ok, noted :)
Pywin32 was installed, though. So the error must come from elsewhere.

@q1ngyang
Copy link

q1ngyang commented Jul 5, 2023

I have encountered the same issue as well, ensuring that pywin32 is installed.

C:\Users\q1ngyang>pip list
Package Version


pypiwin32 223
pywin32 306

C:\Users\q1ngyang>pip install DisplayCAL
Collecting DisplayCAL
Using cached DisplayCAL-3.9.11.tar.gz (10.6 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
:20: DeprecationWarning: 'msilib' is deprecated and slated for removal in Python 3.13
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\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:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1264.0_x64__qbz5n2kfra8p0\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\q1ngyang\AppData\Local\Temp\pip-build-env-37mq2ww7\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\q1ngyang\AppData\Local\Temp\pip-build-env-37mq2ww7\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "C:\Users\q1ngyang\AppData\Local\Temp\pip-build-env-37mq2ww7\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File "", line 1583, in
File "", line 446, in setup
File "C:\Users\q1ngyang\AppData\Local\Temp\pip-install-jmza9rnf\displaycal_cc6ca13125a5429aa9a5c93cb6ad87a2\DisplayCAL\util_os.py", line 53, in
from win32file import *
ModuleNotFoundError: No module named 'win32file'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

@AstralStorm
Copy link

AstralStorm commented Jan 3, 2024

pywin32 would have to be specified in project.toml - however that will break non-windows builds. As such, the setup.py has to be modified to add build system dependencies dynamically as per:
https://setuptools.pypa.io/en/latest/build_meta.html#dynamic-build-dependencies-and-other-build-meta-tweaks

@AstralStorm
Copy link

Fixed in my pull request.

@515orestis
Copy link

Fixed in my pull request.

the commit seems to work. clone the project from dev branch
but when i try to start DisplayCAL from powershell this text instead for the appUi

#!C:\Python312\python.exe

-- coding: utf-8 --

from DisplayCAL.main import main

main()

@AstralStorm
Copy link

AstralStorm commented Feb 15, 2024

The commit does not fix the executable creation and the shell script is a Bash script, not PowerShell.

You can run DisplayCal in the virtualenv after installing for the moment, using:
python ./DisplayCal.pyw
from the dist tarball
Likewise works for the other executables.

or in the source code directory
python ./main.py
for the uncompiled version.

@eoyilmaz
Copy link
Owner

Fixed with #312

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants