Newbie or Release 2023.10.0 problem

15 views
Skip to first unread message

David Farmer (austega)

unread,
Oct 9, 2023, 3:50:30 AM10/9/23
to photini
Hi Jim.

I hope this is the appropriate way to seek help with a Photini problem. 

A few weeks ago I managed to install Photini on my W11 64bit laptop and use it productively. I was mainly adding dates and locations to scanned images of prints.

I came back to do some more today using a Taskbar shortcut I had created when I installed it. Photini appeared to open normally and I was able edit time/date successfully but I found I had a problem when trying to add a location to some images using the Google Maps tab.

The map appeared as expected and I was able to search on a location to take me to the appropriate map area. However when I clicked on the map location I wanted to use, the image selection jumped from the images I had selected to other images. Tried multiple times with same symptoms.

I checked the Photini version and realised it was not the current version so I tried to follow the updating instructions for Win  in https://photini.readthedocs.io/en/latest/other/installation.html#updating-photini .

It appeared to update correctly (as far as I could tell from the Cmd screen), but when I opened Photini from the taskbar icon it returned the old version.

I tried some troubleshooting (tentatively) and have copied the command screen responses below hoping that will help diagnosis of what the problem is, and what I need to do.
---
C:\Users\auste>python -m photini -v
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\__main__.py", line 21, in <module>
    from photini.editor import main
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editor.py", line 31, in <module>
    from photini.editsettings import EditSettings
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editsettings.py", line 21, in <module>
    from photini.pyqt import (
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 129, in <module>
    raise ex
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 118, in <module>
    {'PyQt5': import_PyQt5,
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 88, in import_PyQt6
    from PyQt6 import QtCore, QtGui, QtNetwork, QtWidgets
ModuleNotFoundError: No module named 'PyQt6'

C:\Users\auste>python -m photini --version
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\__main__.py", line 21, in <module>
    from photini.editor import main
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editor.py", line 31, in <module>
    from photini.editsettings import EditSettings
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editsettings.py", line 21, in <module>
    from photini.pyqt import (
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 129, in <module>
    raise ex
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 118, in <module>
    {'PyQt5': import_PyQt5,
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 88, in import_PyQt6
    from PyQt6 import QtCore, QtGui, QtNetwork, QtWidgets
ModuleNotFoundError: No module named 'PyQt6'
--

Thanks in advance for your help and for your useful program.

David

Jim Easterbrook

unread,
Oct 9, 2023, 4:00:33 AM10/9/23
to pho...@googlegroups.com
On 09/10/2023 05:21, David Farmer (austega) wrote:
>
> I hope this is the appropriate way to seek help with a Photini problem.

Yes, this way anyone else with the same problem might find enlightenment.

> I came back to do some more today using a Taskbar shortcut I had created
> when I installed it. Photini appeared to open normally and I was able
> edit time/date successfully but I found I had a problem when trying to
> add a location to some images using the Google Maps tab.
>
> The map appeared as expected and I was able to search on a location to
> take me to the appropriate map area. However when I clicked on the map
> location I wanted to use, the image selection jumped from the images I
> had selected to other images. Tried multiple times with same symptoms.

That does sound odd. Were you clicking on an "empty" map location or on
one of Photini's markers? If you click on a Photini marker it changes
the image selection to all the photos with that GPS location.

> I checked the Photini version and realised it was not the current
> version so I tried to follow the updating instructions for Win
> in https://photini.readthedocs.io/en/latest/other/installation.html#updating-photini .
>
> It appeared to update correctly (as far as I could tell from the Cmd
> screen), but when I opened Photini from the taskbar icon it returned the
> old version.

Running 'photini-post-install -r' to remove the taskbar icon before
uninstalling would have been a good idea. Running photini-post-install
now should sort it out.

> I tried some troubleshooting (tentatively) and have copied the command
> screen responses below hoping that will help diagnosis of what the
> problem is, and what I need to do.
> ---
> C:\Users\auste>python -m photini -v > ModuleNotFoundError: No module named 'PyQt6'

This means Photini couldn't find PyQt6. Try running photini-configure to
select and install PyQt6 or PySide6.

--
Jim Easterbrook <http://www.jim-easterbrook.me.uk/>

David Farmer (austega)

unread,
Oct 9, 2023, 7:20:48 PM10/9/23
to photini
Thanks Jim.

I think I may have misinterpreted the following part of your update instructions:
"C:\Users\Jim>pip install -U photini

The -U option tells pip to update Photini to the latest available version.

If you upgrade Python you shouldn’t need to reinstall Photini or its dependencies if only the patch level changes (e.g. 3.8.9 to 3.8.10). After a more significant Python upgrade (e.g. 3.7.x to 3.8.y) you will need to do a fresh installation of Photini and its dependencies."

I thought the update was solely Photini and did not involve an update to Python - so thought I would achieve the update by simply doing "C:\Users\Jim>pip install -U photini" in a Cmd window.

Did I need to do an uninstall and reinstall?

Jim Easterbrook

unread,
Oct 10, 2023, 2:23:47 AM10/10/23
to pho...@googlegroups.com
On 10/10/2023 00:20, David Farmer (austega) wrote:
>
> I think I may have misinterpreted the following part of your update
> instructions:
> "C:\Users\Jim>pip install -U photini
>
> The -U option tells pip to update Photini to the latest available version.
>
> If you upgrade Python you shouldn’t need to reinstall Photini or its
> dependencies if only the patch level changes (e.g. 3.8.9 to 3.8.10).
> After a more significant Python upgrade (e.g. 3.7.x to 3.8.y) you will
> need to do a fresh installation of Photini and its dependencies."
>
> I thought the update was solely Photini and did not involve an update to
> Python - so thought I would achieve the update by simply doing
> "C:\Users\Jim>pip install -U photini" in a Cmd window.

You are right - that's what I meant by those unclear instructions.

> Did I need to do an uninstall and reinstall?

You shouldn't need to. The command 'pip show photini' should tell you
where photini is installed and what version it is.

The photini-configure command is needed to ensure you have a compatible
Qt package installed.

David Farmer (austega)

unread,
Oct 11, 2023, 8:09:15 PM10/11/23
to photini
Thanks Jim, but I am still having problems - probably due to my errors.

I have listed my latest Cmd window workings, hoping you can give me the next steps to try:
---
Microsoft Windows [Version 10.0.22621.2428]
(c) Microsoft Corporation. All rights reserved.

C:\Users\auste>pip show photini
Name: Photini
Version: 2023.10.0
Summary: Simple photo metadata editor
Home-page: https://github.com/jim-easterbrook/Photini
Author: Jim Easterbrook
Author-email: j...@jim-easterbrook.me.uk
License: GPLv3+
Location: C:\Users\auste\AppData\Roaming\Python\Python311\site-packages
Requires: appdirs, cachetools, chardet, exiv2, requests
Required-by:

C:\Users\auste>photini-configure
'photini-configure' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\auste>photini-post-install
'photini-post-install' is not recognized as an internal or external command,
operable program or batch file.


C:\Users\auste>python -m photini
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\__main__.py", line 21, in <module>
    from photini.editor import main
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editor.py", line 31, in <module>
    from photini.editsettings import EditSettings
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editsettings.py", line 21, in <module>
    from photini.pyqt import (
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 129, in <module>
    raise ex
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 118, in <module>
    {'PyQt5': import_PyQt5,
  File "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 88, in import_PyQt6
    from PyQt6 import QtCore, QtGui, QtNetwork, QtWidgets
ModuleNotFoundError: No module named 'PyQt6'
----
Is there something obvious I have missed. By the way I note the Cmd window listing starts with a Win 10 reference, but I am actually using Win 11.

David

Jim Easterbrook

unread,
Oct 12, 2023, 3:34:05 AM10/12/23
to pho...@googlegroups.com
On 12/10/2023 01:09, David Farmer (austega) wrote:
>
> I have listed my latest Cmd window workings, hoping you can give me the
> next steps to try:
> ---
> Microsoft Windows [Version 10.0.22621.2428]
> (c) Microsoft Corporation. All rights reserved.
>
> C:\Users\auste>pip show photini
> Name: Photini
> Version: 2023.10.0
> Summary: Simple photo metadata editor
> Home-page: https://github.com/jim-easterbrook/Photini
> Author: Jim Easterbrook
> Author-email: j...@jim-easterbrook.me.uk
> License: GPLv3+
> Location: C:\Users\auste\AppData\Roaming\Python\Python311\site-packages
> Requires: appdirs, cachetools, chardet, exiv2, requests
> Required-by:

Good, that shows you have installed the latest Photini.

> C:\Users\auste>photini-configure
> 'photini-configure' is not recognized as an internal or external command,
> operable program or batch file.
>
> C:\Users\auste>photini-post-install
> 'photini-post-install' is not recognized as an internal or external command,
> operable program or batch file.

This suggests that those two commands are not on your %PATH%. The pip
command works though, so some Python commands are being found.

You should have a Python "scripts" directory somewhere, maybe
C:\Users\auste\AppData\Roaming\Python\Python311\Scripts
This should contain both pip.exe and photini-configure.exe

On my Windows 7 (virtual machine only used for testing) the Python stuff
is all under C:\Users\Jim\AppData\Local\, not
C:\Users\Jim\AppData\Roaming\, but both script directories are in %PATH%.

You could do 'pip show pip' to see if pip is installed in "Local" or
"Roaming".

> C:\Users\auste>python -m photini
> Traceback (most recent call last):
>   File "<frozen runpy>", line 198, in _run_module_as_main
>   File "<frozen runpy>", line 88, in _run_code
>   File
> "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\__main__.py", line 21, in <module>
>     from photini.editor import main
>   File
> "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editor.py", line 31, in <module>
>     from photini.editsettings import EditSettings
>   File
> "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\editsettings.py", line 21, in <module>
>     from photini.pyqt import (
>   File
> "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 129, in <module>
>     raise ex
>   File
> "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 118, in <module>
>     {'PyQt5': import_PyQt5,
>   File
> "C:\Users\auste\AppData\Roaming\Python\Python311\site-packages\photini\pyqt.py", line 88, in import_PyQt6
>     from PyQt6 import QtCore, QtGui, QtNetwork, QtWidgets
> ModuleNotFoundError: No module named 'PyQt6'

PyQt6 still needs to be installed. photini-configure is the easy way,
but you can also do

pip install photini[pyqt6]

to install Photini's PyQt6 dependencies.

> Is there something obvious I have missed. By the way I note the Cmd
> window listing starts with a Win 10 reference, but I am actually using
> Win 11.
I think Windows 11 is internally still Windows 10.

Jim Easterbrook

unread,
Oct 12, 2023, 3:45:18 AM10/12/23
to pho...@googlegroups.com
On 12/10/2023 08:34, Jim Easterbrook wrote:
>
> On my Windows 7 (virtual machine only used for testing) the Python stuff
> is all under C:\Users\Jim\AppData\Local\, not
> C:\Users\Jim\AppData\Roaming\, but both script directories are in %PATH%.

I've found
https://discuss.python.org/t/windows-appdata-roaming-vs-local/2682 which
says pip installs stuff to "roaming" if the '--user' option is set.

On a single user Windows Python installation there's no need to use
'--user' and I don't think I've mentioned it in the Photini Windows
installation instructions.

But if both "local" and "roaming" Python script directories are in
%PATH% then it should all work anyway.

David Farmer (austega)

unread,
Oct 12, 2023, 7:14:33 AM10/12/23
to photini
Thanks Jim for your help and perseverance.

I have now managed to edit the PATH variable to include the roaming scripts folder and all seems now to be fine. Probably due to the note in your last message PIP was installed in the LOCAL folders but the rest was installed in the ROAMING folders.

When I next uninstall and reinstall Photini I will try to avoid using the --user option.

Jim Easterbrook

unread,
Oct 26, 2023, 10:17:43 AM10/26/23
to pho...@googlegroups.com
On 12/10/2023 12:14, David Farmer (austega) wrote:
>
> I have now managed to edit the PATH variable to include the roaming
> scripts folder and all seems now to be fine. Probably due to the note in
> your last message PIP was installed in the LOCAL folders but the rest
> was installed in the ROAMING folders.
>
> When I next uninstall and reinstall Photini I will try to avoid using
> the --user option.

I've been experimenting (on Windows 7, as that's all I have) and have
concluded that it's all a bit of a mess.

A single user Python installation (i.e. the default if you don't
customise your Python installation) puts its packages in
c:\users\jim\appdata\local\python\python38\site-packages
These get added to or upgraded by pip, unless you use pip's --user flag,
when the packages are put in
c:\users\jim\appdata\roaming\python\python38\site-packages

So you can easily end up with two different versions of a package in
different places. This shouldn't be a problem, if %PATH% has both
directories, in the right order, as packages installed with --user
should take preference.

Unfortunately the Python installer doesn't always set %PATH% correctly,
and if you have more than one version of Python installed you can get in
a right mess.

The 'py' launcher program installed by the Python installer is supposed
to sort all this out. It launches Python with the environment set to use
your --user packages correctly and seems to work quite well.

To start Photini you can do 'py -m photini', and to run pip you do 'py
-m pip'.

For new installations I now strongly recommend using a Python "virtual
environment". This allows you to put all the Photini dependencies in a
directory of your choice (e.g. c:\users\jim\photini\lib\site-packages)
which is completely separate from the Python installation. I've updated
the documentation accordingly.

David Farmer (austega)

unread,
Jan 6, 2024, 1:05:34 AMJan 6
to photini
Hi Jim.

After using Photini successfully for a few months (basically adding location and date metadata to scanned images) I now have a new Win11 laptop and am revisiting some Python/Photini installation issues.

I am pursuing the Microsoft Store Python 3.12 Installer option and it seemed to install fine as an app.

Trying to run py in a Command window did not however find anything.

I permanently edited the Path environmental variable to:  C:\Program Files\Python 3.12;%PATH%;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps 

and can confirm I found Python.exe at C:\Users\auste\AppData\Local\Microsoft\WindowsApps\python.exe

Still could not find py in the Command window.

I am not confident in my understanding of how this all hangs together - have I missed something obvious? 

I did however test that the "python" and "pip" words were recognised in the command prompt and when they were I tried proceeding with the photini installation - and it proceeded as expected until I reached the photini-configure step when it returned errors - see the attached screenshot.

Being still an optimist I tried running photini with python -m photini but received the exact same error message.

What do you suggest?

David
photini-configure issue Screenshot 2024-01-06 165532.png

Jim Easterbrook

unread,
Jan 6, 2024, 3:52:29 AMJan 6
to pho...@googlegroups.com, David Farmer (austega)
On 06/01/2024 06:05, David Farmer (austega) wrote:
>
> I am pursuing the Microsoft Store Python 3.12 Installer option and it
> seemed to install fine as an app.

I know nothing about Microsoft Store Python. What advantage does it
offer over Python downloaded from python.exe?

> Trying to run py in a Command window did not however find anything.

If you haven't used an installer that offers to install the 'py' command
then you probably don't have the option to use it. Just use 'python' and
all should be well, assuming the Python executable is on your path.

> I permanently edited the Path environmental variable to:  C:\Program
> Files\Python 3.12;%PATH%;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps

I prefer not to mess about with path if possible - it makes upgrading a
bit of a pain.

> and can confirm I found Python.exe at
> C:\Users\auste\AppData\Local\Microsoft\WindowsApps\python.exe
>
> Still could not find py in the Command window.

It almost certainly doesn't exist on your system.

> I did however test that the "python" and "pip" words were recognised in
> the command prompt and when they were I tried proceeding with the
> photini installation - and it proceeded as expected until I reached the
> photini-configure step when it returned errors - see the attached
> screenshot.

The 'pkg_resources' package is not installed on your system. I never
added it to Photini's dependencies as I assumed it would always be
there. However, it's been deprecated in Python 3.11 so might not be
installed by default in Python 3.12. Try installing it yourself:

pip install pkg_resources

PS Instead of posting a screenshot it's a lot easier to read a block of
text. Right-click in the command window to select "mark", then select
the block of text and copy-paste into your email.
Reply all
Reply to author
Forward
0 new messages