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 Installer #45

Open
Ark74 opened this issue Jan 30, 2017 · 8 comments
Open

Windows Installer #45

Ark74 opened this issue Jan 30, 2017 · 8 comments

Comments

@Ark74
Copy link

Ark74 commented Jan 30, 2017

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

@adrienverge
Copy link
Owner

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.

@sharmer156
Copy link

sharmer156 commented Dec 20, 2018

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.

@CrazyEoin
Copy link

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

@adrienverge
Copy link
Owner

Use Linux 👍

@Ark74
Copy link
Author

Ark74 commented Jan 18, 2019

I would suggest that too, being using GNU/Linux for the passed 12 years now 😃
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. 📆

@Markel
Copy link

Markel commented Feb 21, 2019

Or you could use a virtual machine 😄

@realuser
Copy link

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.

@kburchfiel
Copy link

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!

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

7 participants