Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No module named 'socks'

import requests, socket, socks
ModuleNotFoundError: No module named 'socks'

I have tried pip install socks, and followed instructions of other stackoverflow posts but none of them worked. I'm working on pycharm right now and I have also installed socks and socket on there, in fact, it does show I have installed it. And yes, I do have it on the right interpreter.

How can I solve this?

OS: Latest version of Ubuntu

like image 698
Rightfully Avatar asked Feb 17 '20 00:02

Rightfully


People also ask

How to fix modulenotfounderror - no module named ‘Socks’ in Python?

When you are developing network application using python, you may find this error: ModuleNotFoundError: No module named ‘socks’. In this tutorial, we will introduce you how to fix this error. Install python library pip install pysocks Then when you import socks library, this error is fixed. Category: Python

Why am I getting a module name error when importing it?

The first reason of this error is the name of the module is incorrect, so you have to check out the module name that you had imported. For example, let's try to import os module with double s and see what will happen:

Why can't I import a module with double s?

The first reason of this error is the name of the module is incorrect, so you have to check out the module name that you had imported. For example, let's try to import os module with double s and see what will happen: as you can see, we got No module named 'oss'.

Why can't I install a module?

1 The name of the module is incorrect 2 The path of the module is incorrect 3 The Library is not installed More ...


2 Answers

I think you mean to install PySocks so do pip install PySocks pypi docs for PySocks pip install socks installs something different pypi docs for socks

like image 67
DontBe3Greedy Avatar answered Sep 20 '22 21:09

DontBe3Greedy


pip install pysocks

should fix it for you.

Pysocks website

like image 40
Jeroen Avatar answered Sep 21 '22 21:09

Jeroen