Traceback (most recent call last):
File "server.py", line 1, in <module>
import SocketServer
ModuleNotFoundError: No module named 'SocketServer'\
Asked
Active
Viewed 296 times
-1

martineau
- 119,623
- 25
- 170
- 301

El Amri Iheb
- 13
- 1
-
2Welcome to Stack Overflow! Please provide a [mcve], reading the [how to ask](https://stackoverflow.com/help/how-to-ask) section will also help you get more details that we need. – Chillie Oct 02 '19 at 20:04
-
What are you trying to do? Can you provide reproducable sample code to replicate the problem? – Devon Oliver Oct 02 '19 at 20:05
1 Answers
-1
The Error is because you did not install the package.
Install the package, before importing them
For Python command prompt,
pip install package_name
pip install httpserver
For Anaconda Navigator prompt,
conda install package_name
When Importing Socketsever, all in small letters (Package got renamed in python3)
import socketserver

Sudharsana Rajasekaran
- 320
- 3
- 12
-
-
-
**import socketserver** in Python3 the package got renamed, all to lower case. socketserver not be installed it comes with the python distribution. – Sudharsana Rajasekaran Oct 02 '19 at 20:31