Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install Socks / SocksIPy on Ubuntu?

I am new to python and would like to install SocksIPy on Ubuntu (running within a VirtualBox vm). The README says to place the socks.py file into my lib/site-packages directory. I do not know where to locate this directory. The Terminal command python socks.py install from the root runs, but does not install correctly (error "No module named socks" when I run import socks in a python script)

SocksIPy link http://socksipy.sourceforge.net/

Can someone suggest a way to get socks/socksipy running on my machine? Thanks!

like image 471
user1868039 Avatar asked Feb 11 '13 20:02

user1868039


3 Answers

The simplest way to install it - provided the VM has working Internect connectivity - would likely be to let apt-get do it for you. From a terminal:

sudo apt-get install python-socksipy

It's in the universe repository, which should be enabled by default. If not, you can enable it yourself.

like image 151
eldarerathis Avatar answered Nov 12 '22 05:11

eldarerathis


PySocks is yet another SocksiPy fork:

$ pip install PySocks

It works on Python 2/3.

like image 28
jfs Avatar answered Nov 12 '22 05:11

jfs


For Python3

$ sudo apt-get install python3-socks
like image 1
Anshuman Kirty Avatar answered Nov 12 '22 06:11

Anshuman Kirty