mmotti / pihole-regex

Custom regex filter list for use with Pi-hole.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python bug?

DjCrays opened this issue · comments

commented

root@raspberrypi:~# curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/install.py | sudo python3 File "<stdin>", line 65 print(f'{path_pihole} was not found') ^ SyntaxError: invalid

is what i get when i try to use your Script (btw all of them ^^ Could you tell me why they are not working? :3 Thank you and Marry Christmess. :3

Hmm that is an odd one! Do you definitely have Python 3 installed?

What is the output if you run: python3 --version

The only reason I ask is because I'm pretty sure f strings were introduced in Python 3 and that's what seems to be throwing a syntax error.

If you don't have it installed, try running these commands before running the script again:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3 python3-pip python3-dev build-essential
sudo pip3 install setuptools wheel

Merry Christmas to you, too! :)

commented

Hey. :)

root@raspberrypi:~# python3 --version Python 3.5.3

jep i do have python installed... so.. even when i try to extra step to check:

root@raspberrypi:~# sudo apt-get update Holen:1 http://archive.raspberrypi.org/debian stretch InRelease [25,4 kB] OK:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease OK:3 http://linux-packages.resilio.com/resilio-sync/deb resilio-sync InRelease Es wurden 25,4 kB in 1 s geholt (15,7 kB/s). Paketlisten werden gelesen... Fertig root@raspberrypi:~# sudo apt-get upgrade Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig Paketaktualisierung (Upgrade) wird berechnet... Fertig 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. root@raspberrypi:~# sudo apt-get install python3 python3-pip python3-dev build-essential Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut. Statusinformationen werden eingelesen.... Fertig build-essential ist schon die neueste Version (12.3). python3 ist schon die neueste Version (3.5.3-1). python3-dev ist schon die neueste Version (3.5.3-1). python3-pip ist schon die neueste Version (9.0.1-2+rpt2). 0 aktualisiert, 0 neu installiert, 0 zu entfernen und 0 nicht aktualisiert. root@raspberrypi:~# sudo pip3 install setuptools wheel Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages Requirement already satisfied: wheel in /usr/lib/python3/dist-packages

commented

Well, that is an minor problem i think. Just build it with: https://gist.github.com/dschep/24aa61672a2092246eaca2824400d37f

and now i just have to add .6 to the end of any command :D Thank you. :)

Hello, I have just experienced this same issue myself when trying to install. I was hoping that there would be an issue already posted before that would help me troubleshoot, and I did find this one and resolved the issue in similar fashion.

However, other users might not be as motivated as I to search through Closed Issues to figure out why things aren't working for them. I would suggest you add a Troubleshooting section to the main Readme that addresses this issue and points people towards a method for installing Python 3.6+ on their Pi.

Hi :)

This is a good idea - Perhaps I will link directly to this issue from the main readme page. I will add this to my to-do list.

Thanks for the suggestion!