PhotoCollage icon indicating copy to clipboard operation
PhotoCollage copied to clipboard

Windows Installer

Open Ark74 opened this issue 8 years ago • 8 comments

I'm not really familiar with python, but can PhotoCollage be compiled(?) as a binary for Windows. Can it be installed on Windows? Is there a way to achieve it? Could you point me on the right direction to understand more over this subject.

Thanks

Ark74 avatar Jan 30 '17 10:01 Ark74

Hi, sorry but I have no idea.

If you find a way to make it work on Windows, I'm curious to know to how.

adrienverge avatar Jan 30 '17 13:01 adrienverge

windows 10 error: Failed building wheel for photocollage when pip3 install photocollage

error report

 Running setup.py clean for photocollage
Failed to build photocollage
Installing collected packages: photocollage
  Running setup.py install for photocollage ... error
    Complete output from command c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\chz\\AppData\\Local\\Temp\\pip-install-9r0g8hn_\\photocollage\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\chz\AppData\Local\Temp\pip-record-uuw1zm9i\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib
    creating build\lib\photocollage
    copying photocollage\artwork.py -> build\lib\photocollage
    copying photocollage\collage.py -> build\lib\photocollage
    copying photocollage\gtkgui.py -> build\lib\photocollage
    copying photocollage\render.py -> build\lib\photocollage
    copying photocollage\__init__.py -> build\lib\photocollage
    running build_scripts
    creating build\scripts-3.6
    copying and adjusting bin\photocollage -> build\scripts-3.6
    running build_i18n
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\chz\AppData\Local\Temp\pip-install-9r0g8hn_\photocollage\setup.py", line 127, in <module>
        "six",
      File "c:\programdata\anaconda3\lib\distutils\core.py", line 148, in setup
        dist.run_commands()
      File "c:\programdata\anaconda3\lib\distutils\dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "c:\programdata\anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\programdata\anaconda3\lib\site-packages\setuptools\command\install.py", line 61, in run
        return orig.install.run(self)
      File "c:\programdata\anaconda3\lib\distutils\command\install.py", line 545, in run
        self.run_command('build')
      File "c:\programdata\anaconda3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\programdata\anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "c:\programdata\anaconda3\lib\distutils\command\build.py", line 135, in run
        self.run_command(cmd_name)
      File "c:\programdata\anaconda3\lib\distutils\cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "c:\programdata\anaconda3\lib\distutils\dist.py", line 974, in run_command
        cmd_obj.run()
      File "C:\Users\chz\AppData\Local\Temp\pip-install-9r0g8hn_\photocollage\setup.py", line 36, in run
        raise Exception("GNU gettext msgfmt utility not found! "
    Exception: GNU gettext msgfmt utility not found! It is needed to compile po files.

sharmer156 avatar Dec 20 '18 09:12 sharmer156

I've the exact same issue as sharmer156 on Windows 10. Any ideas?

CrazyEoin avatar Jan 18 '19 12:01 CrazyEoin

Use Linux :+1:

adrienverge avatar Jan 18 '19 12:01 adrienverge

I would suggest that too, being using GNU/Linux for the passed 12 years now :smiley: But for some folks in schools mainly who uses Windows, this tools would be of great use. Looks like it can be done, here some info: https://stackoverflow.com/questions/25381761/creating-an-installer-for-a-python-gtk3-application

Maybe later this month I can recheck or later. :calendar:

Ark74 avatar Jan 18 '19 18:01 Ark74

Or you could use a virtual machine 😄

Markel avatar Feb 21 '19 05:02 Markel

I got photocollage working on Windows 10.

Initially I just tried pip install photocollage

This command finishes without error but then trying to run photocollage brings up the default Windows program chooser ("How do you want to open this file?") Choosing python does nothing.

Then I tried python -c "from photocollage import gtkgui; gtkgui.main()"

Which gave the error: ModuleNotFoundError: No module named 'cairo'

I installed pycairo tried again and got

ModuleNotFoundError: No module named 'gi'

So instead I decided to try Anaconda. I created a new environment

conda create --name pc
conda activate pc
conda install -c conda-forge pygobject gtk3 pillow

I still had to install photocollage via pip since doesn't seem to be a conda package for it. pip install photocollage

Trying just photocollage at the command line didn't work but then I tried python -c 'from photocollage import gtkgui; gtkgui.main()'

which gave yet another error:

  File "<string>", line 1
    'from
    ^
SyntaxError: unterminated string literal (detected at line 1)

I replaced the single quotes with double quotes:

python -c "from photocollage import gtkgui; gtkgui.main()"

And success! Got the photocollage gui to appear and seems to be working correctly.

realuser avatar Sep 21 '22 19:09 realuser

Thank you @realuser --this worked great for me also in Windows 10! I followed some similar steps within my miniforge Python environment:

pip install photocollage conda install pycairo conda install pygobject conda install gtk3

(I already had pillow loaded on my system.)

Then, as you recommended, I ran python -c "from photocollage import gtkgui; gtkgui.main()" and it loaded!

kburchfiel avatar Apr 09 '23 20:04 kburchfiel