neothematrix / noip-renew

Auto renew (confirm) noip.com free hosts
https://hub.docker.com/r/moebiuss/noip-renew
Apache License 2.0
54 stars 20 forks source link

Error installing on rpi #51

Closed viseniv closed 5 months ago

viseniv commented 7 months ago

Wen y try to run the setup.sh i get this error.

The following packages were automatically installed and are no longer required: chromium-common libevent-2.1-7 libjsoncpp25 libminizip1 libopenh264-7 libopenjp2-7 libsnappy1v5 libwebpdemux2 libwebpmux3 libwoff1 libxnvctrl0 Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 9 not upgraded. error: externally-managed-environment

× This environment is externally managed ╰─> To install Python packages system-wide, try apt install python3-xyz, where xyz is the package you are trying to install.

If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.

For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages. hint: See PEP 668 for the detailed specification.

neothematrix commented 7 months ago

ciao and thanks for the report. I can't test the install script on RPI, but try commenting out line 40 of setup.sh:

$SUDO $PYTHON -m pip install selenium

and add after line "90", this:

$SUDO apt -y install $PYTHON-selenium

Angel0ffDeath commented 7 months ago

@viseniv Will check this tomorrow, but probably script is a little bit outdated (setup.sh) First update your pi manually - update,upgrade,autoremove, then skip this step in setup.sh. Install selenium manually via pip3 install selenium==version (check first python3 requirements - @neothematrix thanks for merging my PR). Selenium version should be not greater than 4.10.0. Then run setup.sh. If there are problems, please post full output from setup.sh and not the error only If there is an error, please also post your raspbian version, python etc I tested setup.sh few weeks ago and there was no problems - see closed issue #46

Angel0ffDeath commented 7 months ago

Im not able to reproduce your error. Everything is working by me. Either try suggestions above or post the full output from setup.sh, but according to me the problem is with selenium installation.

Angel0ffDeath commented 7 months ago

@viseniv I tested today setup.sh few times while playing with selenium versions. Everything is ok by me.

Angel0ffDeath commented 7 months ago

@neothematrix If there is no more info from @viseniv, I would recommend to close this issue... Give some more days though...

neothematrix commented 7 months ago

thanks @Angel0ffDeath, actually I had the same error while building the docker images using latest debian release, I think it might be something that changed in recent debian version (bookworm?). Raspberry OS is based on debian right? perhaps @viseniv is using one of the latest version of raspberry OS based on debian bookworm and your tests @Angel0ffDeath were based on the previous version?

Angel0ffDeath commented 7 months ago

@neothematrix 1. Yes Raspberry OS is based on debian. 2. For the tests I used clean installation of Raspberry OS light on a headless pi 4 with 4G RAM. Raspberry OS version is bullseye - kernel version 6.1.21-v8+; python3 is v. 3.9; python command installs directly the latest selenium - v.4.17.2. I played after that with selenium installations via pip3 uninstall selenium and pip3 install selenium==version. Since I believe the problem is with selenium installation you can try to install it manually with pip3 and after that running setup.sh it will not overwrite current selenium installation and according to me will skip this step, so it should work. However can try with the latest RPi OS, but next weekend.... unfortunately...

EDIT: And bullseye is Debian 11. It looks like bookworm should be12 -> not tested on that

neothematrix commented 7 months ago

yup, bookworm is debian 12 and the issue seems to be with that version: the setup.sh installs selenium via "pip" (not apt) and bookworm debian complains that the correct way to install it would be to use an official debian package instead via "apt install python3-selenum". However, reading the code comments, it seems in the past it was decided to use "pip" installation of selenium because the version of selenium provided by debian 9 official apt packages was too outdated for the script.

Angel0ffDeath commented 7 months ago

@neothematrix try to change selenium installation with sudo pip3 install selenium. On bullseye it works I have old pi's running previous versions (debian 9 and 10 and acan test it) pip installation works on debian 11 (bullseye) btw If we want to keep debian9 installation, probably we can move this with python 3.5 version.... (although probably only I use debian 9, but it will take me about a month to migrate to newer version... Dont have so much time right now. But if only I use it - we can remove support of debian 9 and python 3.5) Make with apt. Then I can test on previous versions

Edit: At the moment we install selenium we know python version. In setup.sh you can add check - if python version < 3.7 leave installation as it it else install via apt or pip3. Pip3 installation will comply only if started without sudo, so both apt and pip3 should work