luigifab / python-radexreader

Reader for the RADEX RD1212 and the RADEX ONE Geiger counters.
GNU General Public License v2.0
11 stars 3 forks source link

error on MacOS Python3 #12

Closed GuzzoTheLuke closed 1 year ago

GuzzoTheLuke commented 1 year ago

Hi, when I run the program (radexreader.py) with "readall" command I receive this message Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> readall NameError: name 'readall' is not defined

When I use "radexreader readall" command I receive this other message SyntaxError: invalid syntax

Where am I doing wrong? Thanks for the help!

luigifab commented 1 year ago

How did you install the program? How do you run the program? What is your Python version?

GuzzoTheLuke commented 1 year ago

I'm trying to run the Python program via IDLE on my mac with Python 3 installed. sorry but i'm not very familiar with Python, I hope I haven't misconstrued Python

Schermata 2022-12-03 alle 15 31 07

luigifab commented 1 year ago

Okay, no, you must run the program like any other program from a Terminal. For example: image

Edit: perhaps with IDLE you can do the same by typing /Users/..../radexreader.py and readall on the same line.

GuzzoTheLuke commented 1 year ago

Schermata 2022-12-03 alle 16 15 32 The result is not better :'(

GuzzoTheLuke commented 1 year ago

Schermata 2022-12-03 alle 16 19 10 refering to "edit"

luigifab commented 1 year ago

Good. Now you need to install libusb, for example: brew install libusb.

GuzzoTheLuke commented 1 year ago

same result zsh: command not found: readall

luigifab commented 1 year ago

No YOU MUST write the command line in one line!

GuzzoTheLuke commented 1 year ago

Schermata 2022-12-03 alle 19 27 45 I'm really sorry, but I can't understand what I'm doing wrong... 😭

GuzzoTheLuke commented 1 year ago

Sorry, do you have some hints about the problem?

luigifab commented 1 year ago

It's seems that libusb is not installed? or perhaps you need to use sudo? sudo python3 ....

GuzzoTheLuke commented 1 year ago

pip install pyusb Requirement already satisfied: pyusb in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (1.2.1)

and sudo don't change anything

luigifab commented 1 year ago

Yes, the problem is not pyusb but libusb.

With Windows you need to download a .dll and put it in the right directory. With Alpine Linux you need to run apk add libusb. With Mac I'm not sure, something like brew install libusb (source).

GuzzoTheLuke commented 1 year ago

Schermata 2022-12-03 alle 19 27 45 I'm really sorry, but I can't understand what I'm doing wrong... 😭

Sorry I give up... I've done what you were asking, I tried to reinstall libusb and pyusb (the error change when I tried compiling with one of those installed) and I've checked that Python3 was up to date... I don't know what to do... You've tried to help, but your suggestion can't help me. Good luck

luigifab commented 1 year ago

I think the problem is not python, but only libusb. But I don't know how to help you.