ModuleNotFoundError No module named urllib2

Detailed map traversal, teach you to master the complex gremlin query debugging method>>>

ModuleNotFoundError No module named urllib2? So in the process of editing to develop code, there will be errors in the code, which is also caused by differences in versions

Tools/raw materials



After using python3 to import urllib2 package, when developing code, the message of modulenotfoundererror no module named urllib2 will appear

You can see that the current import is import urllib2

First of all, you need to confirm what version of Python the current project file uses. Click the fill — settings option

Enter the settings interface and select the project interpreter option. What you can see is for Python 3

Modify the code and change the import to inport urllib. Request

After the modification, after the current code, you can see that no error will be reported

Similar Posts: