I have been getting this message, "No module named '_socket'", since I installed python 3.6, about two months ago.
My platform is Slackware Linux (14.2). I compiled python3.6 from source, because binary python packages aren't distributed by python.org for Linux. I have the same experience on multiple Slackware computers, not just one. Actually, this problem hits the 64-bit distribution. I have a 32-bit Slackware box that has no trouble with _socket. I can not 'import socket' into a program, nor can I use 'pip' to install modules. These require the _socket module, which doesn't exist. What does exist is a shared library object called '_ socket.cpython-36m-i386-linux-gnu.so'. This looks tantalizingly like the missing module, but it is for a 32-bit architecture. This is not the only missing module for 64-bit Slackware Linux. I can not find a trace of the 'math' module, which, again, works fine on my 32-bit computer. I am far from an expert on installing python modules, so I am asking for advice on how I should proceed to find these modules. Thanks in advance. "BryGuy" (my handle on linuxquestions.org) -- https://mail.python.org/mailman/listinfo/python-list