GithubHelp home page GithubHelp logo

Comments (5)

semuadmin avatar semuadmin commented on July 26, 2024

Hi @richardklingler

Sorry you're having difficulties, but I can only imagine you have a corrupted installation somehow.

PyGPSClient runs fine under MacOS 13.2.* on both Intel and M1/M2 platforms and Python versions >=3.7, <=3.11. The image file in question appears in the About dialog - see screen shots below.

I've not come across that 'Tk deprecation' warning before on a Mac - there may be something odd about your Python installation. It may be worth upgrading to the latest Python 3.11 (alongside 3.9 if necessary) to see if that resolves the problem, or re-installing Python 3.9 via the Mac 64-bit Universal Installer (https://www.python.org/ftp/python/3.9.13/python-3.9.13-macos11.pkg).

Screenshot 2023-03-08 at 08 22 07

Screenshot 2023-03-08 at 08 05 42

from pygpsclient.

richardklingler avatar richardklingler commented on July 26, 2024

Fiddled around a bit and tried installing 3.11.2 via pyenv...no joy...

Only this helped:

brew install python-tk

from pygpsclient.

semuadmin avatar semuadmin commented on July 26, 2024

Hi @richardklingler

Glad you got it sorted, but I'm surprised you had to do a brew install of python-tk on MacOS - this is typically only necessary on some Linux platforms.

The standard universal Python installation package for MacOS (from python.org, not the App Store) includes all the necessary tkinter runtimes and environment configuration. I've never needed to install brew or macports on any of my Mac workstations.

https://www.python.org/ftp/python/3.11.2/python-3.11.2-macos11.pkg

from pygpsclient.

brandonros avatar brandonros commented on July 26, 2024
 $ python3 -m pip install --upgrade pygpsclient
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pygpsclient in ./Library/Python/3.9/lib/python/site-packages (1.3.30)
Requirement already satisfied: requests>=2.28.0 in ./Library/Python/3.9/lib/python/site-packages (from pygpsclient) (2.31.0)
Requirement already satisfied: Pillow>=9.0.0 in ./Library/Python/3.9/lib/python/site-packages (from pygpsclient) (10.0.0)
Requirement already satisfied: pygnssutils>=1.0.11 in ./Library/Python/3.9/lib/python/site-packages (from pygpsclient) (1.0.11)
Requirement already satisfied: pyserial>=3.5 in ./Library/Python/3.9/lib/python/site-packages (from pygpsclient) (3.5)
Requirement already satisfied: pyspartn>=0.1.10 in ./Library/Python/3.9/lib/python/site-packages (from pygpsclient) (0.1.10)
Requirement already satisfied: paho-mqtt>=1.6.1 in ./Library/Python/3.9/lib/python/site-packages (from pygnssutils>=1.0.11->pygpsclient) (1.6.1)
Requirement already satisfied: pyubx2>=1.2.28 in ./Library/Python/3.9/lib/python/site-packages (from pygnssutils>=1.0.11->pygpsclient) (1.2.28)
Requirement already satisfied: cryptography>=39.0.2 in ./Library/Python/3.9/lib/python/site-packages (from pyspartn>=0.1.10->pygpsclient) (41.0.2)
Requirement already satisfied: charset-normalizer<4,>=2 in ./Library/Python/3.9/lib/python/site-packages (from requests>=2.28.0->pygpsclient) (3.2.0)
Requirement already satisfied: idna<4,>=2.5 in ./Library/Python/3.9/lib/python/site-packages (from requests>=2.28.0->pygpsclient) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in ./Library/Python/3.9/lib/python/site-packages (from requests>=2.28.0->pygpsclient) (2.0.4)
Requirement already satisfied: certifi>=2017.4.17 in ./Library/Python/3.9/lib/python/site-packages (from requests>=2.28.0->pygpsclient) (2023.5.7)
Requirement already satisfied: cffi>=1.12 in ./Library/Python/3.9/lib/python/site-packages (from cryptography>=39.0.2->pyspartn>=0.1.10->pygpsclient) (1.15.1)
Requirement already satisfied: pynmeagps>=1.0.27 in ./Library/Python/3.9/lib/python/site-packages (from pyubx2>=1.2.28->pygnssutils>=1.0.11->pygpsclient) (1.0.27)
Requirement already satisfied: pyrtcm>=1.0.11 in ./Library/Python/3.9/lib/python/site-packages (from pyubx2>=1.2.28->pygnssutils>=1.0.11->pygpsclient) (1.0.11)
Requirement already satisfied: pycparser in ./Library/Python/3.9/lib/python/site-packages (from cffi>=1.12->cryptography>=39.0.2->pyspartn>=0.1.10->pygpsclient) (2.21)
MacBook-Air:~ brandon 2023-07-28 14:52:43 $ pygpsclient
/Users/brandon/Library/Python/3.9/lib/python/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
Traceback (most recent call last):
  File "/Users/brandon/Library/Python/3.9/bin/pygpsclient", line 8, in <module>
    sys.exit(main())
  File "/Users/brandon/Library/Python/3.9/lib/python/site-packages/pygpsclient/__main__.py", line 47, in main
    App(root, **kwargs)
  File "/Users/brandon/Library/Python/3.9/lib/python/site-packages/pygpsclient/app.py", line 130, in __init__
    self.__master.iconphoto(True, PhotoImage(file=ICON_APP))
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4064, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/tkinter/__init__.py", line 4009, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "/Users/brandon/Library/Python/3.9/lib/python/site-packages/pygpsclient/resources/iconmonstr-location-27-32.png"

from pygpsclient.

semuadmin avatar semuadmin commented on July 26, 2024

Hi @brandonros

The clue is in the error message:

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.

As is mentioned in the README.md, the version of Python that is preinstalled on MacOS includes a deprecated version of tkinter (8.5). God only knows why - it's been deprecated for nearly 10 years now. You'll need to upgrade this to the latest version 8.6, and by far the easiest way to do this is to simply install Python using the official Python.org MacOS 'universal2' installer, which works for both Intel and Apple Silicon:

https://www.python.org/downloads/release/python-3114/

I STRONGLY RECOMMEND against using brew or macports to install python or tkinter - that will almost certainly lead to a corrupted installation.

If you want to check the version of tkinter you're running, you can run the following script:

import tkinter
tkinter.TkVersion

To find the low level version, use:

import tkinter
tcl = tkinter.Tcl()
print(tcl.call("info", "patchlevel"))

Hope this helps

from pygpsclient.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.