-
Notifications
You must be signed in to change notification settings - Fork 98
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
Raspberry pi 4 - python #106
Comments
Cannot you just |
Don't use pip. It's a binary library and is dependent on another binary
library. Use the GitHub source to build and install it.
…On Wed, Sep 27, 2023, 2:41 AM ArashiCZ ***@***.***> wrote:
Hello.
I'm running 64bit raspios lite.
I tried to use pip3 install usbrelay-py, however i'm constantly getting
this error:
`
sudo pip3 install usbrelay-py
Looking in indexes: https://pypi.org/simple,
https://www.piwheels.org/simple
Collecting usbrelay-py
Using cached usbrelay_py-1.0.tar.gz (4.1 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmp60x1dyl7_in_process.py
get_requires_for_build_wheel /tmp/tmpkxq_s836
cwd: /tmp/pip-install-erk9tjr_/usbrelay-py_039f083e8680440686396df0d7a080d8
Complete output (15 lines):
Traceback (most recent call last):
File "/tmp/tmp60x1dyl7_in_process.py", line 280, in
main()
File "/tmp/tmp60x1dyl7_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmp60x1dyl7_in_process.py", line 114, in
get_requires_for_build_wheel
return hook(config_settings)
File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py",
line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py",
line 325, in _get_build_requires
self.run_setup()
File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py",
line 341, in run_setup
exec(code, locals())
File "", line 17, in
ImportError: cannot import name 'setuptools' from 'setuptools'
(/usr/local/lib/python3.9/dist-packages/setuptools/*init*.py)
WARNING: Discarding
https://files.pythonhosted.org/packages/0c/ad/4036a83246a7f7e59919323fd4d1f589284b9afe539fe33c0a8036bd12f2/usbrelay_py-1.0.tar.gz#sha256=d0c74c358132ce1055487ebd6ad59bb84209d8417d670ff9d61c798eb8b783d1
(from https://pypi.org/simple/usbrelay-py/). Command errored out with
exit status 1: /usr/bin/python3 /tmp/tmp60x1dyl7_in_process.py
get_requires_for_build_wheel /tmp/tmpkxq_s836 Check the logs for full
command output.
ERROR: Could not find a version that satisfies the requirement usbrelay-py
ERROR: No matching distribution found for usbrelay-py
`
Tried to reinstall setuptools, update pip, few other things and nothing.
—
Reply to this email directly, view it on GitHub
<#106>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVJI5E3TSQMRVSQ3FDDX4MATRANCNFSM6AAAAAA5IAT3UQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This is what i get when running the "make" command inside the folder usbrelay_py.
|
I'd be careful with the Debian package. It's not maintained.
…On Wed, Sep 27, 2023, 3:57 PM ArashiCZ ***@***.***> wrote:
Cannot you just apt install python3-usbrelay?
Apparently not.
[image: image]
<https://user-images.githubusercontent.com/10303007/270876344-6f1d6240-957c-48d2-aa95-c319f0c3b8e6.png>
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVNNDZ4JDGXO6KPOCATX4O54NANCNFSM6AAAAAA5IAT3UQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The Fedora package is fully up-to-date! |
That's odd. There is a Debian python3-usbrelay package that is the current
version. Can you just install usbrelay package?
…On Wed, Sep 27, 2023, 3:57 PM ArashiCZ ***@***.***> wrote:
Cannot you just apt install python3-usbrelay?
Apparently not.
[image: image]
<https://user-images.githubusercontent.com/10303007/270876344-6f1d6240-957c-48d2-aa95-c319f0c3b8e6.png>
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVNNDZ4JDGXO6KPOCATX4O54NANCNFSM6AAAAAA5IAT3UQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ha, almost. Did you see my mastodon post to you and Michal :)
…On Wed, Sep 27, 2023, 4:18 PM Mark E Fuller ***@***.***> wrote:
The Fedora package is fully up-to-date!
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVM276A6QEZ7W6AID5LX4PAK3ANCNFSM6AAAAAA5IAT3UQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I tried to use atleast the "Sudo usbrelay" that i installed with apt, which works perfectly by the way with "| sed" and locating lines (relay) after the line with "Number of Relays" but it behaves strangly. It doesn't catch the line with the serial numbers. I would like to avoid this by using the python extension. Thank you. |
@darrylb123 I did see your message, which is why v1.2.1 is in Rawhide, and within a couple days of clearing testing on F39 - F37: https://src.fedoraproject.org/rpms/usbrelay |
The documentation to build usbrelay and python extension is in the readme
on GitHub.
If you installed the package, you should be able to check the manual page.
Also, the option flags are output with the -h flag:
$ usbrelay -h
usbrelay: invalid option -- 'h'
Try `usbrelay --help' or `usbrelay --usage' for more information.
***@***.*** ~]$ usbrelay --help
Usage: usbrelay [OPTION...] [ACTION...]
Control or query USB HID relays.
-d, --debug Produce debugging output
-e, --export-id=DEV Print relay ID of the given DEV
(/dev/hidrawXX) in
udev-compatible format
-q, --quiet Be quiet
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version
Mandatory or optional arguments to long options are also mandatory or
optional
for any corresponding short options.
Without ACTION, the actual state of all relays is printed to stdout.
ACTION can be one of:
RELID_N=[0|1] to switch the N-th relay off or on
RELID_0=NEWID to change relay ID
Report bugs to https://github.com/darrylb123/usbrelay/issues.
…On Wed, Sep 27, 2023, 4:31 PM ArashiCZ ***@***.***> wrote:
I tried to use atleast the "Sudo usbrelay" that i installed with apt,
which works perfectly by the way with "| sed" and locating lines (relay)
after the line with "Number of Relays" but it behaves strangly. It doesn't
catch the line with the serial numbers.
I would like to avoid this by using the python extension.
Would someone help me a guide me how to build the library for python.
I'm planing to use it my upcoming project that is build upon these usb
relays (home automation),
is it possible to just copy the library after building it to differnt pi ?
(same hw).
Thank you.
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVM2NQVCTMEDKONTSEDX4PB5BANCNFSM6AAAAAA5IAT3UQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, I looked at the help, but as i posted before, I cannot build the library according to the instructions. |
You have to build the main library first.
Run make in the top level directory first then sudo make install, then cd
to usbrelay_py and run make and sudo make install.
…On Wed, Sep 27, 2023 at 5:13 PM ArashiCZ ***@***.***> wrote:
The documentation to build usbrelay and python extension is in the readme
on GitHub. If you installed the package, you should be able to check the
manual page. Also, the option flags are output with the -h flag: $ usbrelay
-h usbrelay: invalid option -- 'h' Try usbrelay --help' or usbrelay
--usage' for more information. *@*.*** ~]$ usbrelay --help Usage:
usbrelay [OPTION...] [ACTION...] Control or query USB HID relays. -d,
--debug Produce debugging output -e, --export-id=DEV Print relay ID of the
given DEV (/dev/hidrawXX) in udev-compatible format -q, --quiet Be quiet
-?, --help Give this help list --usage Give a short usage message -V,
--version Print program version Mandatory or optional arguments to long
options are also mandatory or optional for any corresponding short options.
Without ACTION, the actual state of all relays is printed to stdout. ACTION
can be one of: RELID_N=[0|1] to switch the N-th relay off or on
RELID_0=NEWID to change relay ID Report bugs to
https://github.com/darrylb123/usbrelay/issues.
… <#m_1245572597775667863_>
On Wed, Sep 27, 2023, 4:31 PM ArashiCZ *@*.*> wrote: I tried to use
atleast the "Sudo usbrelay" that i installed with apt, which works
perfectly by the way with "| sed" and locating lines (relay) after the line
with "Number of Relays" but it behaves strangly. It doesn't catch the line
with the serial numbers. I would like to avoid this by using the python
extension. Would someone help me a guide me how to build the library for
python. I'm planing to use it my upcoming project that is build upon these
usb relays (home automation), is it possible to just copy the library after
building it to differnt pi ? (same hw). Thank you. — Reply to this email
directly, view it on GitHub <#106 (comment)
<#106 (comment)>>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABTSUVM2NQVCTMEDKONTSEDX4PB5BANCNFSM6AAAAAA5IAT3UQ
<https://github.com/notifications/unsubscribe-auth/ABTSUVM2NQVCTMEDKONTSEDX4PB5BANCNFSM6AAAAAA5IAT3UQ>
. You are receiving this because you commented.Message ID: @.*>
Yes, I looked at the help, but as i posted before, I cannot build the
library according to the instructions.
***@***.***:~/python_tests/usbrelay/usbrelay-master/usbrelay_py $ make make:
*** No rule to make target '../libusbrelay.so.1.1', needed by 'all'. Stop.
—
Reply to this email directly, view it on GitHub
<#106 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABTSUVIL6KB7UBZS4OYRMXDX4PGZXANCNFSM6AAAAAA5IAT3UQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Oh, I'm sorry @darrylb123 . That totaly went over my head, Thank you. |
Hello.
I'm running 64bit raspios lite.
I tried to use pip3 install usbrelay-py, however i'm constantly getting this error:
`
sudo pip3 install usbrelay-py
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting usbrelay-py
Using cached usbrelay_py-1.0.tar.gz (4.1 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmp60x1dyl7_in_process.py get_requires_for_build_wheel /tmp/tmpkxq_s836
cwd: /tmp/pip-install-erk9tjr_/usbrelay-py_039f083e8680440686396df0d7a080d8
Complete output (15 lines):
Traceback (most recent call last):
File "/tmp/tmp60x1dyl7_in_process.py", line 280, in
main()
File "/tmp/tmp60x1dyl7_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/tmp60x1dyl7_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py", line 355, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py", line 325, in _get_build_requires
self.run_setup()
File "/usr/local/lib/python3.9/dist-packages/setuptools/build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 17, in
ImportError: cannot import name 'setuptools' from 'setuptools' (/usr/local/lib/python3.9/dist-packages/setuptools/init.py)
WARNING: Discarding https://files.pythonhosted.org/packages/0c/ad/4036a83246a7f7e59919323fd4d1f589284b9afe539fe33c0a8036bd12f2/usbrelay_py-1.0.tar.gz#sha256=d0c74c358132ce1055487ebd6ad59bb84209d8417d670ff9d61c798eb8b783d1 (from https://pypi.org/simple/usbrelay-py/). Command errored out with exit status 1: /usr/bin/python3 /tmp/tmp60x1dyl7_in_process.py get_requires_for_build_wheel /tmp/tmpkxq_s836 Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement usbrelay-py
ERROR: No matching distribution found for usbrelay-py
`
Tried to reinstall setuptools, update pip, few other things and nothing.
The text was updated successfully, but these errors were encountered: