Skip to content
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

Python bug? #16

Closed
DjCrays opened this issue Dec 23, 2019 · 6 comments
Closed

Python bug? #16

DjCrays opened this issue Dec 23, 2019 · 6 comments

Comments

@DjCrays
Copy link

DjCrays commented Dec 23, 2019

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

@mmotti
Copy link
Owner

mmotti commented Dec 23, 2019

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! :)

@DjCrays
Copy link
Author

DjCrays commented Dec 23, 2019

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:https://archive.raspberrypi.org/debian stretch InRelease [25,4 kB] OK:2 http:https://raspbian.raspberrypi.org/raspbian stretch InRelease OK:3 http:https://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

@mmotti
Copy link
Owner

mmotti commented Dec 23, 2019 via email

@DjCrays
Copy link
Author

DjCrays commented Dec 23, 2019

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. :)

@DjCrays DjCrays closed this as completed Dec 23, 2019
@Suprcheese
Copy link

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.

@mmotti
Copy link
Owner

mmotti commented Jan 7, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants