Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 6970

Troubleshooting • ntplib not on the Raspberry Pi 4

$
0
0
Hello! I am new to Raspberry Pi and I am trying to write code the uses network time protocol (NTP). When I import ntplib to Python, I get an error message that states, "ModuleNotFoundError: No module named ntplib". I've tried to install ntplib in the terminal with the line "sudo apt-get install ntplib", but it throws an error saying "Unable to locate package ntplib". I then tried "sudo pip3 install ntplib" and that errored: "externally-managed-environment". I then tried "sudo apt install python3-ntplib" and that threw an error after some time saying "Failed to fetch http://deb.debian.org/debian/pool/main/ ... -3_all.deb Temporary failure resolving 'deb.debian.org'" and "Unable to fetch some archives". So I then ran "sudo apt-get update" and it seems that the Pi is failing to resolve deb.debian.org.

I am unsure what I am missing. Is there a different way to install ntplib on the Pi that I have not tried? Thanks in advance.

Statistics: Posted by typicalanybody — Tue Jul 23, 2024 7:14 pm — Replies 0 — Views 20



Viewing all articles
Browse latest Browse all 6970

Trending Articles