installing urllib in Python3.7 - here i encountered issues. I would like to import urllib to use the function 'request'.
However, I encountered an error when trying to do so. I tried pip install urllib but still had the same error. I am using Python 3.7.x Really appreciate any help. i do import urllib.request using this following code:
import urllib.request, urllib.parse, urllib.error
fhand = urllib.request.urlopen('data.pr4e.org/romeo.txt')
counts = dict()
for line in fhand:
words = line.decode().split()
for word in words:
counts[word] = counts.get(word, 0) + 1
print(counts)
but it gives me this error: ModuleNotFoundError:
No Module named 'urllib.parse'; 'urllib' is not a package
pip install urllib3
if i do so i get back this:
root@mx:/home/martin# pip install urllib3
Requirement already satisfied: urllib3 in /usr/lib/python2.7/dist-packages (1.24.1)
root@mx:/home/martin# ^C
root@mx:/home/martin#
well this is funny - since it points out some path to python 2.7
Alternatively, the manpage (https://urllib3.readthedocs.io/en/latest/ ) suggests to go this way: grab the latest source code from GitHub:
Definitely not the same telemetry collected for W10 as there is for W11, and W10 ran great compared to the dumpster fire that is W11 even today 4 years later. Windows 8 was not remarkable and arguably the most forgettable release to date.
Bazzite isn't a fork of SteamOS, it's a fork of Fedora Atomic that runs an interface similar to SteamOS. I'm also curious to hear what improvements it brings over actually running SteamOS on the Deck?
It's not because Windows 11 is superior, it's because users are being forced to Windows 11. Either through threats of EOL of Windows 10 or just enshitification of Windows 10 by latest updates.
The vast majority of "normal" computer users I know don't want windows 11. Not because its bad or they changed the hardware requirements. Its because they like windows 10 better and are comfortable with it. And that they are being forced to windows 11 makes it worse for them. Especially if their PCs are running fine for them. I tell them about 0Patch and Extended Security Update Program. If they have to install windows 11 on their "non compatible" hardware I will help them use rufus.
Question
tarifa
hello dear Experts,
installing urllib in Python3.7 - here i encountered issues. I would like to import urllib to use the function 'request'.
However, I encountered an error when trying to do so. I tried pip install urllib but still had the same error. I am using Python 3.7.x Really appreciate any help. i do import urllib.request using this following code:
but it gives me this error: ModuleNotFoundError:
No Module named 'urllib.parse'; 'urllib' is not a package
if i look at this page: https://urllib3.readthedocs.io/en/latest/
they recomend to install this way:
well this is funny - since it points out some path to python 2.7
Alternatively, the manpage (https://urllib3.readthedocs.io/en/latest/ ) suggests to go this way: grab the latest source code from GitHub:
this i did not try yet! But i will do so
Link to comment
https://www.neowin.net/forum/topic/1393679-installing-urllib-in-python-36-fails-confusion-with-python-27/Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now