How do I install Socks / SocksIPy on Ubuntu?

徘徊边缘 提交于 2019-11-29 06:17:34

问题


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!


回答1:


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.




回答2:


PySocks is yet another SocksiPy fork:

$ pip install PySocks

It works on Python 2/3.




回答3:


For Python3

$ sudo apt-get install python3-socks


来源:https://stackoverflow.com/questions/14820453/how-do-i-install-socks-socksipy-on-ubuntu

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!