semuconsulting/PyGPSClient

MacOSX 11.7.9 no idea what's wrong

MW0SBX opened this issue · 19 comments

MW0SBX commented

marc@marcs-MacBook-Pro ~ % python3 -m pygpsclient
/Users/marc/Library/Python/3.8/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: urllib3/urllib3#3020
warnings.warn(
macOS 11 (1107) or later required, have instead 11 (1106) !
zsh: abort python3 -m pygpsclient
marc@marcs-MacBook-Pro ~ %

MW0SBX commented

I just noticed that bit macOS 11 (1107) or later required, have instead 11 (1106) ! but Mac OSX won't upgrade passed 11.7.9 on my machine. Any way to override it. ???

Hi @MW0SBX

Sorry you're having difficulties, but - failing Google - I'm afraid you may need to direct this question to the maintainer of the urllib3 library, which is the one that seems to be giving you grief. PyGPSClient itself has no pinned OpenSSL version dependency.

If you Google the error, there appear to be quite a few suggested resolutions e.g. https://stackoverflow.com/questions/76187256/importerror-urllib3-v2-0-only-supports-openssl-1-1-1-currently-the-ssl-modu. The options appear to come down to:

  1. Install in a dedicated virtual environment (virtualenv) - see README for instructions.
  2. Install an older version of urllib3
  3. Install a newer version of OpenSSL

Note, however, that:

  1. You may need to use homebrew or macports to install older libraries if pip can't resolve them from standard MacOS repos.
  2. Running older versions of cryptographic libraries like OpenSSL may leave your machine vulnerable to cyber attacks, though I'm guessing your Mac is > ≈8 years old if it won't upgrade beyond 11.7.9 (Big Sur), so that ship may have sailed?

Did you explicitly install LibreSSL yourself, or was it installed as part of another app? You could try uninstalling LibreSSL, retry installing urllib3 and seeing if pip can then resolve the correct OpenSSL dependency automatically.

Unfortunately I no longer have a machine that old to play with (mainly for professional security compliance reasons).

MW0SBX commented

Maybe you need to stop using urllib3 because it stops this project working on any Mac I used opencore patcher and upgraded to osx 12.6.8 and it still complains about urllib3 and still doesn't work.

Maybe you need to stop using urllib3 because it stops this project working on any Mac I used opencore patcher and upgraded to osx 12.6.8 and it still complains about urllib3 and still doesn't work.

I can assure you that PyGPSClient works fine on MacOS 12 or 13 using the official Python.org version of Python (I'm using it on MacOS 13.5.1 as we speak - it's my standard development environment), and many others have installed it without difficulty on older MacOS 11 machines. I believe the problem is not with PyGPSClient or urllib3 - it's with the specific version of OpenSSL you have installed on your machine, as the error message tells you.

PyGPSClient doesn't actually use urllib3 explicitly - it uses the standard requests library to retrieve any internet resources it needs, but this in turn has a lower-level dependency on urllib3 which I have absolutely no control over. I'm not about to write a generic Python internet protocol handler from scratch.

Have you tried installing PyGPSClient using virtualenv? This should in theory provide an 'insulated environment' into which pip can install all the relevant library dependencies without coming into conflict with external apps.

MW0SBX commented
MW0SBX commented

By way of illustration, I just tried a fresh installation on the oldest MacBook I have to hand - an early 2015 MacBook Air running Monterey 12.6.8 on Intel i5. It works fine - see screen shot below...
Screenshot 2023-08-29 at 22 42 14

MW0SBX commented

i tried sudo apt install tk-dev it then complains about java i went and got java and it still complains that its not installed. Sent from Outlook for Androidhttps://aka.ms/AAb9ysg

________________________________ From: Marc ... @.> Sent: Tuesday, August 29, 2023 9:43:42 PM To: semuconsulting/PyGPSClient @.>; semuconsulting/PyGPSClient @.> Cc: Mention @.> Subject: Re: [semuconsulting/PyGPSClient] MacOSX 11.7.9 no idea what's wrong (Issue #88) At the moment it complaining about Tkinter Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
________________________________ From: SEMU Admin @.> Sent: Tuesday, August 29, 2023 9:24:20 PM To: semuconsulting/PyGPSClient @.> Cc: Marc @.>; Mention @.> Subject: Re: [semuconsulting/PyGPSClient] MacOSX 11.7.9 no idea what's wrong (Issue #88) Maybe you need to stop using urllib3 because it stops this project working on any Mac I used opencore patcher and upgraded to osx 12.6.8 and it still complains about urllib3 and still doesn't work. I can assure you that PyGPSClient works fine on MacOS 12 or 13 using the official Python.orghttps://www.python.org/ version of Python (I'm using it on MacOS 13.5.1 as we speak - it's my standard development environment), and many others have installed it without difficulty on older MacOS 11 machines. I believe the problem is not with PyGPSClient or urllib3 - it's with the specific version of OpenSSL you have installed on your machine, as the error message tells you. PyGPSClient doesn't actually use urllib3 explicitly - it uses the standard requests library to retrieve any internet resources it needs, but this in turn has a lower-level dependency on urllib3 which I have absolutely no control over. I'm not about to write a generic Python internet protocol handler from scratch. Have you tried installing PyGPSClient using virtualenv? This should in theory provide an 'insulated environment' into which pip can install all the relevant library dependencies without coming into conflict with external apps. — Reply to this email directly, view it on GitHub<#88 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAZ5ZIXOHXW4DA4FELL7FMDXXZFXJANCNFSM6AAAAAA4DG4LSM. You are receiving this because you were mentioned.Message ID: @.***>

Screenshot 2023-08-29 at 21 50 01

As explained in the README.md, the version of Python that is installed by default on even the latest MacBooks contains a long-deprecated version of tkinter - 8.5). To get round this, you simply need to install the latest official version of Python from Python.org. This will install tkinter 8.6 along with all the other necessary dependencies. You don't need to install tk-dev or java or anything else like that.

I've literally just done this on my old 2015 MacBook Air - it took less than 2 minutes and, as you can see above, it works fine.

MW0SBX commented
MW0SBX commented

@MW0SBX

I am genuinely sorry you're having a hard time installing on your machine, but short of reinstalling MacOS from scratch (from the official Apple source - not an opencore patch) and then installing a fresh copy of Python 3.11 from Python.org, I'm not sure what more I can suggest.

As I say, PyGPSClient has been installed on thousands of MacOS machines - both new and old - without difficulty provided the user has an official version of Python >=3.8 with tkinter >=8.6 installed. I've no idea why Apple still bundles tkinter 8.5 - it's been deprecated for well over 10 years - but I have no control over that.

Would you be able to send me the complete log and traceback from the latest attempted PyGPSClient installation - the one that is now complaining about Tk? i.e. run this command and send me the complete log.txt file:

python3 -m pip install PyGPSClient > log.txt

Can you confirm what you get in response to the following commands (I've illustrated the responses I'm getting on my machine by way of comparison):

from the terminal:

which python3
python3 -V

/Library/Frameworks/Python.framework/Versions/3.11/bin/Python3
Python 3.11.4

from an interactive Python3 prompt:

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

8.6
'8.6.12'

MW0SBX commented

I'm only seeing a partial installation log there (which looks fine) - do you have the complete log?

MW0SBX commented

if you run the command exactly as follows...

python3 -m pip install PyGPSClient > log.txt

... you should end up with a file named log.txt in the same directory. Just send me the complete file - if it's too big to upload to GitHub, send it as an email attachment to semuadmin@semuconsulting.com.

Hi @MW0SBX

Are you able to provide the installation log requested?

Happy to continue to investigate, but I'll close the issue in 5 days if no further response.

MW0SBX commented

I got it working using i think a cleanup using Brew a few days ago.

Ah OK great. I'll close this now.