?
Solved

Python - ImportError: No module named 'urllib2'

Posted on 2016-09-01
2
Medium Priority
?
1,073 Views
Last Modified: 2016-09-01
Hi there,

While running a Python script, I get the following error:
ImportError: No module named 'urllib2'

-Windows 8.1 pro
-Python 3.5.2
-Editor PyCharm 4.5.1

Can you please help me resolve this issue?

Thanks,
Rene
0
Comment
Question by:ReneGe
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 5

Accepted Solution

by:
TechieMD earned 2000 total points
ID: 41780218
In python3, the urllib2 library was split over several modules. If you're trying to use urlopen try importing it from urllib.request:

from urllib.request import urlopen

Open in new window

0
 
LVL 10

Author Comment

by:ReneGe
ID: 41780240
Thanks mate :)

This seems to have resolve the issue

Cheers :)
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question