nxt-python icon indicating copy to clipboard operation
nxt-python copied to clipboard

Add requirements.txt for older Python 3 versions

Open Leolelion2112 opened this issue 8 months ago • 10 comments

Hi there, I'm currently trying to run nxt-python on EV3DEV, but somehow it installs 2.2.2 from the official ev3dev branch.

I can download from this page but i'm missing requirements.txt. Is there a way to add it back?

Leolelion2112 avatar Mar 07 '26 14:03 Leolelion2112

NXT-Python is using poetry, can you run it on EV3DEV?

If not, it only depends on:

python = "^3.9"
pyusb = "^1.2.1"

And optionally for bluetooth:

pybluez = "^0.23"

This is specified in pyproject.toml.

Adding a requirements.txt seems redundant to me.

Also, are you actually trying to control a NXT from the EV3?

schodet avatar Mar 07 '26 17:03 schodet

Yes, I am really trying to run this on an EV3. Basically the pip repo it's stuck to only has up to 2.2.2, so i install only via the link of this repo. Thing is: pip tells me it cannot install because requirements.txt is missing!

(I'm probably repeating what I just said)

Basically you can use the NXT via USB, but the only thing missing is a controller.

I could've used NBC but nxt-python is simply the better way, as i can do a socket from python3 to pybricks-micropython (So, using the micropython thing.. release 2.0.)

Leolelion2112 avatar Mar 07 '26 20:03 Leolelion2112

ev3dev is still on Python 3.5, so there could be other issues even if you manage to get it installed.

You could probably sudo apt install python-nxt to get the old Python 2 version on ev3dev.

dlech avatar Mar 07 '26 21:03 dlech

I am trying to avoid that, because if i get the old python2 nxt-python, well.. it won't work. At all.

Else i somehow upgrade python via the Deadsnakes PPA. But I'm wondering if it could fail, as the EV3 is an old arch.

Leolelion2112 avatar Mar 07 '26 21:03 Leolelion2112

There are some folks that managed to get some newer Python versions running on ev3dev.

Here is one discussion: https://github.com/orgs/ev3dev/discussions/1634

There are probably a few others if you go looking.

dlech avatar Mar 07 '26 21:03 dlech

Thank you dlech!

Leolelion2112 avatar Mar 07 '26 22:03 Leolelion2112

pip can see that nxt-python 3 needs python 3.9, that’s why it does not use this version.

First nxt-python supporting python 3 requested 3.7, it never supported 3.5.

I hope you can update your python version.

schodet avatar Mar 08 '26 18:03 schodet

There are some folks that managed to get some newer Python versions running on ev3dev.

Here is one discussion: https://github.com/orgs/ev3dev/discussions/1634

There are probably a few others if you go looking.

Thanks again, but problem is i can't use the wifi driver. Is it normal?

Leolelion2112 avatar Mar 27 '26 10:03 Leolelion2112

I suggest to move the Wi-Fi discussion to https://github.com/orgs/ev3dev/discussions where someone who knows something about it can help.

I don't know anything more than this page. Either you have a known working dongle or you don't.

dlech avatar Mar 27 '26 13:03 dlech

Sorry, I meant USB tethering.

Leolelion2112 avatar Mar 27 '26 14:03 Leolelion2112