-
Notifications
You must be signed in to change notification settings - Fork 5
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
zoneinfo package also needs to be installed on Anaconda #2
Comments
I was surprised that zoneinfo was missing. I thought that would be standard with the QGIS Python 3.9+. Can you give me the details on what you did to make it work. I could add that to the instructions and potentially use try/except around import zoneinfo. I don't want to use pytz because it is in essence being deprecated. It is already missing some of the time zones that zoneinfo supports. |
I am on MacOS for the M1 (ARM not Intel) processor. The Anaconda QGIS is compiled for M1 so it is better for me than the installers on the QGIS website.
I used the GUI For Anacaonda (Anaconda-Navigator) to install backports.zoneinfo (0.2.1) that had several dependencies that were also installed. I then changed references in the plugin's .py files to import from backports.zoneinfo (functions.py, planetpositions.py, sunposition.py, moonposition.py, infoDialog.py). For example for infoDialog.py:
from backports.zoneinfo import ZoneInfo, available_timezones
When I did that the icons appear in the QGIS toolbar, and all tools work except for the Solar/lunar information tool, which does not do anything (no dialog is opened when I click on it). I even checked to see if the dialog appeared behind the main QGIS window, which it does not. The log messages panel shows only Python warnings for depricated use of numpy matrices.
I have not investigated further.
-Thayer
On Anaconda (for MacOS M1) I need to install backports.zoneinfo and to change your plugin code to import from backports.zoneinfo instead of 'zoneinfo'. When I did that the icons appear in the QGIS toolbar.
On Monday, September 25, 2023 at 09:57:36 AM EDT, C Hamilton ***@***.***> wrote:
I was surprised that zoneinfo was missing. I thought that would be standard with the QGIS Python 3.9+. Can you give me the details on what you did to make it work. I could add that to the instructions and potentially use try/except around import zoneinfo. I don't want to use pytz because it is in essence being deprecated. It is already missing some of the time zones that zoneinfo supports.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
After installing the 'timezonefinder' and 'skyfield' packages the 'zoneinfo' package was still missing, so the additional algorithms still did not work. In Anaconda I was able to install 'zoneinfo' under the name 'backports.zoneinfo', I then modified the plugin code to import from 'backports.zoneinfo' not 'zoneinfo'. I use MacOS.
The text was updated successfully, but these errors were encountered: