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

Windows support #88

Open
johndoe46 opened this issue Jan 16, 2021 · 11 comments
Open

Windows support #88

johndoe46 opened this issue Jan 16, 2021 · 11 comments
Assignees
Labels
duplicate This issue or pull request already exists enhancement New feature or request release Release management

Comments

@johndoe46
Copy link

Hello,

Thank you for your work on the python bindings of gmic.

Is Windows 64 support still on your radar ?

I can provide testing.

@myselfhimself
Copy link
Owner

Hello sorry for missing this, yes it is on my radar.. in the trimester if I do it myself.
Otherwise I would need for someone who has Windows and is befriended with the MSVC compiler and Python's binary modules building, or who would accept me to lead her/him by a videoconference call or so, if he has Windows computer and is a tech person.
Even the Windows virtual machine I had downloaded had a failing MSVC license... and I was short in available time back then..

Linked to #5

@johndoe46
Copy link
Author

I'm not familiar with the MS build tools but they are installed on my system, so I guess I can execute whatever commands you need.

I can already send you the pip trace:


PS C:\Users\user1> pip install gmic
Collecting gmic
  Using cached gmic-0.0.2.tar.gz (1.3 MB)
Building wheels for collected packages: gmic
  Building wheel for gmic (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\users\user1\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-_92d_bje\\gmic_3bc3d7b4076a427f841c4586c6fae7b8\\setup.py'"'"'; __file__='"'"'C:\\Users\\user1\\AppData\\Local\\Temp\\pip-install-_92d_bje\\gmic_3bc3d7b4076a427f841c4586c6fae7b8\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\user1\AppData\Local\Temp\pip-wheel-3jpp6s7b'
       cwd: C:\Users\user1\AppData\Local\Temp\pip-install-_92d_bje\gmic_3bc3d7b4076a427f841c4586c6fae7b8\
  Complete output (18 lines):
  running bdist_wheel
  running build
  running build_py
  file gmic.py (for module gmic) not found
  file gmic.py (for module gmic) not found
  running build_ext
  building 'gmic' extension
  creating build
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\src
  creating build\temp.win-amd64-3.9\Release\src\gmic
  creating build\temp.win-amd64-3.9\Release\src\gmic\src
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Dgmic_build -Dcimg_use_png -Dcimg_date="" -Dcimg_time="" -Dgmic_is_parallel -Dcimg_use_zlib -Dcimg_display=1 -I. -Isrc/gmic/src -Ic:\users\user1\appdata\local\programs\python\python39\include -Ic:\users\user1\appdata\local\programs\python\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /EHsc /Tpgmicpy.cpp /Fobuild\temp.win-amd64-3.9\Release\gmicpy.obj -std=c++11
  clÿ: Ligne de commande warning D9002ÿ: option '-std=c++11' inconnue ignor‚e
  gmicpy.cpp
  C:\Users\user1\AppData\Local\Temp\pip-install-_92d_bje\gmic_3bc3d7b4076a427f841c4586c6fae7b8\src\gmic\src\./CImg.h(386): fatal error C1083: Impossible d'ouvrir le fichier includeÿ: 'X11/Xlib.h'ÿ: No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.26.28801\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for gmic

@myselfhimself
Copy link
Owner

Hello,
clÿ: Ligne de commande warning D9002ÿ: option '-std=c++11' inconnue ignor‚e
this is enough to require MSVC knowledge as it would imply that the setup.py file should have specifities for Windows...

I need to see how frequent libgmic static objects are released.. it could spare a lot of work...

@myselfhimself
Copy link
Owner

@myselfhimself
Copy link
Owner

Hello @johndoe46 , I have private feedback from some who managed to have gmic-py for Linux working on Windows thanks to WSL (Windows subsystem Linux) and optionnally windowed display works if https://sourceforge.net/projects/vcxsrv/ is installed.
Would you like to go on this way while waiting for someone to release gmic-py for Windows?

Simple question... is gmic-py support for libopenCV a MUST for you?

@johndoe46
Copy link
Author

Hello @myselfhimself ,

Thanks for the feedback.

Yes, WSL (version 2) is good and I use it for development needs, however it's not something that is installed out of the box on all windows pcs, so we can't count on it for software distribution. (on a side note, MS is currently adding support for graphic apps: https://www.pcworld.com/article/3543763/windows-10-moves-closer-to-true-linux-with-graphical-support-for-wsl2.html ).

gmic-py libopencv support is probably not a must for us.

We're not in a hurry anyway, I just think gmic+python is an incredible opportunity for imagery software in general and should see a wide adoption (which means win64 support).

Thank you for your time.

@myselfhimself
Copy link
Owner

myselfhimself commented Feb 1, 2021 via email

@myselfhimself myselfhimself self-assigned this Apr 11, 2021
@myselfhimself myselfhimself added enhancement New feature or request release Release management duplicate This issue or pull request already exists labels Apr 11, 2021
@Elessar11777
Copy link

Hi, i'm not very experienced in programming, but I in high need of gmic implementation in python code for windows desktop application.
By forum and git discussions it looks like possible, but I have no idea how. Can you advice me any way to dig into?

@myselfhimself
Copy link
Owner

Hello @Elessar11777 I recommend you use WSL or WSL2 (Ubuntu on Linux.. ie. windows subsystem) and run pip install gmic in the Linux shell.
gmic-py was never successfully compiled for Windows, it is not impossible but not done. If you have development skills and Visual Studio for C++ development on Windows this can be tried but can take maybe 8-16 hours together by shared screen on week-ends...

@myselfhimself
Copy link
Owner

On https://gmic.eu/download.html see the Src - Windows paragraph
G'MIC compiles well with Msys2

@myselfhimself
Copy link
Owner

With msys2 you will need python headers and libs, possibly from the python msys2 pacman packages: https://packages.msys2.org/search?t=pkg&q=python (python or mingw-w64-python)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists enhancement New feature or request release Release management
Projects
None yet
Development

No branches or pull requests

3 participants