KYDronePilot / hdfm

UI for live weather/traffic/meta data collected from HD Radio stations
Other
166 stars 12 forks source link

Build on MacOS? #16

Closed rd0fun closed 3 years ago

rd0fun commented 3 years ago

I've tried the class-reorganization branch and was unable to get it to build properly.

Is there something specific required to launch the make?

KYDronePilot commented 3 years ago

What OS are you trying to build it on and what error(s) are you getting?

rd0fun commented 3 years ago

I am using MacOS Catalina 10.15.7

I am trying to build with the "class-reorganization" release.

Maybe some simple instructions could help me?

thank you

Makefile:8: .env: No such file or directory sed: .env: No such file or directory make: *** No rule to make target `.env'. Stop.

KYDronePilot commented 3 years ago

Sorry for the delay.

I would recommend against using that branch. I started rebuilding the entire user interface in that branch and was never able to completely finish due to issues with the Tkinter library. I have future plans for rebuilding the interface again using a different framework, but haven't started on it yet.

In the mean time, try using the master branch.

I just fixed something in master that was causing issues, so make sure you pull the latest commit. Let me know if it works or if you have any issues.

rd0fun commented 3 years ago

Thanks for the reply! Just tried latest master... got this error. Still not working.

python3 hdfm.py 99.5
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 "hdfm.py", line 95, in <module>
    main.run()
  File "hdfm.py", line 83, in run
    self.nrsc5.run()
  File "/Users/rzach/Downloads/hdfm-master/src/gui.py", line 337, in run
    self.nbsr.start()
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/python@3.8/3.8.6/Frameworks/Python.framework/Versions/3.8/lib/python3.8/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_thread.lock' object
KYDronePilot commented 3 years ago

Guessing this is an issue with Python 3.8... Try installing the latest version of Python 3.7 and see if that works. That's what I'm testing it with and I didn't run into that issue.

rd0fun commented 3 years ago

Still no joy!

$ python -V

Python 3.7.9

$ ./hdfm.py 99.5

Traceback (most recent call last):

File "./hdfm.py", line 7, in

import src.gui

File "/Users/me/Downloads/hdfm-master/src/gui.py", line 3, in

import tkinter

File "/Users/me/.pyenv/versions/3.7.9/lib/python3.7/tkinter/init.py", line 36, in

import _tkinter # If this fails your Python may not be configured for Tk

ModuleNotFoundError: No module named '_tkinter'

On Mon, Nov 2, 2020 at 7:01 PM Michael Galliers notifications@github.com wrote:

Guessing this is an issue with Python 3.8... Try installing the latest version of Python 3.7 and see if that works. That's what I'm testing it with and I didn't run into that issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/KYDronePilot/hdfm/issues/16#issuecomment-720793902, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARM2R44TZ6WIMYD2KC3SBHTSN5B5BANCNFSM4STUHVSQ .

KYDronePilot commented 3 years ago

Oh I forgot, you have to install Python from https://python.org in order to get Tkinter (used for the GUI) included. Other install methods don't include this library.

Install Python 3.7 from this link: https://www.python.org/ftp/python/3.7.8/python-3.7.8-macosx10.9.pkg. The new Python 3.7 executable should be at /Library/Frameworks/Python.framework/Versions/3.7/bin/python3.

Also, when running the script with multiple Python versions installed, you'll probably need to explicitly call the interpreter with /Library/Frameworks/Python.framework/Versions/3.7/bin/python3 hdfm.py <frequency> to make sure it uses the right binary.

rd0fun commented 3 years ago

Thanks for all the tips. I finally got it working!

1) Installed 3.7.9 from Pythin.org for Mac (that includes tk as you said) 2) ran the shell file 'Update Shell Profile.command' found in the '/Applications/Python 3.7' directory 3) ran 'pip3 install Pillow' 4) ran './hdfm.py -l -c 2 102.1' 5) Celebrated!

KYDronePilot commented 3 years ago

That's great! Let me know if you run into any issues.