Search code examples
pythonshellurllibpython-idle

I can't run python from IDLE or cmd


my python was working perfect. From one day to the next I tried to run a program to scrape and it started giving me the following error: "No module named irllib" Note that I write irllib (with i). My program has not been modified and no line says 'irl' (they are with urllib). Then Python stopped working. When I run it from IDLE it only shows the blank shell screen as it appears in this image: enter image description here

I can't even close the program. I must enter task manager and settle the process from there. I have tried to run it from Atom and it is useless. If I run any script using cmd it gives me the 'irllib' error: enter image description here

If I only start python from the cmd it does start and if I type 1 + 1 it returns 2. In the previous days I have not installed anything new on my machine.

I have done the following: 1) I uninstalled and reinstalled Python. Without effect. 2) I uninstalled Atom, in case any script causes an error. Without effect. 3) I have scanned my machine using Kaspersky in safe Windows mode considering that the 'irllib' is very suspicious. Virus free. However, the Eset nod32 online scanner was left blank as well. Malwarebytes detected Trojans and removed them, but it does not allow me to do rootkit analysis and the problem with Python persists. Trendmicro rootkit analysis does not reflect problems. 4) I also checked the urllib module in the library and there is no 'irllib' anywhere. Please help me! What is this problem about and how do I solve it?

System data: minilaptop with Windows 7 starter (SP1) 32 bits, RAM (1G). Python 3.8.1. The PATH is registered in the system variables.

Greetings for everyone and thanks in advance.


Solution

  • I have already managed to solve my problem with the python shell. When I reinstalled python to try to fix the problem, python was installed in 'C:\Program Files' and there was another routing in 'C:\Users\myuser\AppData\Local\Programs ...' I opted to delete the first folder in Programs Files (I just deleted it, didn't uninstall python again) and left only the AppData one. That solved my problem with the Shell. The solution to the 'irllib' problem was provided by martineau, thank you very much.