dish@a68:~>sshuttle

dish@a68:~>sshuttle

Output is  
Traceback (most recent call last):   File "/usr/bin/sshuttle", line 6, in      from pkg_resources import load_entry_point ImportError: No module named pkg_resources   Reinstall python3-setuptools is not help. 

Thank you for your help!

shuttle requires python2?

rpm -ql sshuttle
rpm -ql sshuttle
/usr/bin/sshuttle
/usr/lib/python2.7/site-packages/sshuttle
/usr/lib/python2.7/site-packages/sshuttle-0.78.1-py2.7.egg-info
/usr/lib/python2.7/site-packages/sshuttle-0.78.1-py2.7.egg-info/PKG-INFO
/usr/lib/python2.7/site-packages/sshuttle-0.78.1-py2.7.egg-info/SOURCES.txt
/usr/lib/python2.7/site-packages/sshuttle-0.78.1-py2.7.egg-info/dependency_links.txt
/usr/lib/python2.7/site-packages/sshuttle-0.78.1-py2.7.egg-info/entry_points.txt
/usr/lib/python2.7/site-packages/sshuttle-0.78.1-py2.7.egg-info/top_level.txt
/usr/lib/python2.7/site-packages/sshuttle/__init__.py
/usr/lib/python2.7/site-packages/sshuttle/__init__.pyc
/usr/lib/python2.7/site-packages/sshuttle/__main__.py
/usr/lib/python2.7/site-packages/sshuttle/__main__.pyc
/usr/lib/python2.7/site-packages/sshuttle/assembler.py
/usr/lib/python2.7/site-packages/sshuttle/assembler.pyc
/usr/lib/python2.7/site-packages/sshuttle/client.py
/usr/lib/python2.7/site-packages/sshuttle/client.pyc
/usr/lib/python2.7/site-packages/sshuttle/cmdline.py
/usr/lib/python2.7/site-packages/sshuttle/cmdline.pyc
/usr/lib/python2.7/site-packages/sshuttle/firewall.py
/usr/lib/python2.7/site-packages/sshuttle/firewall.pyc
/usr/lib/python2.7/site-packages/sshuttle/helpers.py
/usr/lib/python2.7/site-packages/sshuttle/helpers.pyc
/usr/lib/python2.7/site-packages/sshuttle/hostwatch.py
/usr/lib/python2.7/site-packages/sshuttle/hostwatch.pyc
/usr/lib/python2.7/site-packages/sshuttle/linux.py
/usr/lib/python2.7/site-packages/sshuttle/linux.pyc
/usr/lib/python2.7/site-packages/sshuttle/methods
/usr/lib/python2.7/site-packages/sshuttle/methods/__init__.py
/usr/lib/python2.7/site-packages/sshuttle/methods/__init__.pyc
/usr/lib/python2.7/site-packages/sshuttle/methods/nat.py
/usr/lib/python2.7/site-packages/sshuttle/methods/nat.pyc
/usr/lib/python2.7/site-packages/sshuttle/methods/pf.py
/usr/lib/python2.7/site-packages/sshuttle/methods/pf.pyc
/usr/lib/python2.7/site-packages/sshuttle/methods/tproxy.py
/usr/lib/python2.7/site-packages/sshuttle/methods/tproxy.pyc
/usr/lib/python2.7/site-packages/sshuttle/options.py
/usr/lib/python2.7/site-packages/sshuttle/options.pyc
/usr/lib/python2.7/site-packages/sshuttle/server.py
/usr/lib/python2.7/site-packages/sshuttle/server.pyc
/usr/lib/python2.7/site-packages/sshuttle/ssh.py
/usr/lib/python2.7/site-packages/sshuttle/ssh.pyc
/usr/lib/python2.7/site-packages/sshuttle/ssnet.py
/usr/lib/python2.7/site-packages/sshuttle/ssnet.pyc
/usr/lib/python2.7/site-packages/sshuttle/ssyslog.py
/usr/lib/python2.7/site-packages/sshuttle/ssyslog.pyc
/usr/lib/python2.7/site-packages/sshuttle/stresstest.py
/usr/lib/python2.7/site-packages/sshuttle/stresstest.pyc
/usr/lib/python2.7/site-packages/sshuttle/version.py
/usr/lib/python2.7/site-packages/sshuttle/version.pyc
/usr/share/man/man1/sshuttle.1.gz

Reinstall python3-setuptools is not help.

Maybe python2-setuptools?

I wonder why the openSUSE package uses python2.

You could try

su -
zypper rm sshuttle
pip3 install sshuttle
exit

If the pip3 install is the way, why the sshuttle package is being contained in the default respository?

pip3 is the platform independent python package manager associated with https://pypi.org

It’s not “the way”, but “a way” – a choice, which in this case uses python3 instead of python2.
Maybe it will work for you.

dish@a68:~> sshuttle -r root@5.2.3.2 0/0 --dns -x 5.2.3.2 --python '/usr/bin/python2.7'

After entering local password, errors:

Traceback (most recent call last):
  File "/usr/bin/sshuttle", line 11, in <module>
    load_entry_point('sshuttle==0.78.1', 'console_scripts', 'sshuttle')()
  File "/usr/lib/python2.7/site-packages/sshuttle/cmdline.py", line 74, in main
    opt.daemon, opt.pidfile)
  File "/usr/lib/python2.7/site-packages/sshuttle/client.py", line 533, in main
    nslist += resolvconf_nameservers()
  File "/usr/lib/python2.7/site-packages/sshuttle/helpers.py", line 60, in resolvconf_nameservers
    for line in open('/etc/resolv.conf'):
IOError: [Errno 2] No such file or directory: '/etc/resolv.conf'

I’v installed python2-setuptools and try again.

dish@a68:~> sshuttle -r root@5.2.3.2 0/0 --dns -x 5.2.3.2 --python ‘/usr/bin/python2.7’

After entering local password, errors:

Traceback (most recent call last):
File “/usr/bin/sshuttle”, line 11, in <module>
load_entry_point(‘sshuttle==0.78.1’, ‘console_scripts’, ‘sshuttle’)()
File “/usr/lib/python2.7/site-packages/sshuttle/cmdline.py”, line 74, in main
opt.daemon, opt.pidfile)
File “/usr/lib/python2.7/site-packages/sshuttle/client.py”, line 533, in main
nslist += resolvconf_nameservers()
File “/usr/lib/python2.7/site-packages/sshuttle/helpers.py”, line 60, in resolvconf_nameservers
for line in open(‘/etc/resolv.conf’):
IOError: [Errno 2] No such file or directory: ‘/etc/resolv.conf’

Is “sysconfig-netconfig” installed? That’s what provides “/etc/resolv.conf”

zypper info sysconfig-netconfig
dish@a68:~> sudo zypper info sysconfig-netconfig
Loading repository data...
Reading installed packages...


Information for package sysconfig-netconfig:
--------------------------------------------
Repository     : Main Repository                          
Name           : sysconfig-netconfig                      
Version        : 0.85.2-lp151.1.1                         
Arch           : x86_64                                   
Vendor         : openSUSE                                 
Support Level  : unsupported                              
Installed Size : 169.1 KiB                                
Installed      : Yes (automatically)                      
Status         : up-to-date                               
Source package : sysconfig-0.85.2-lp151.1.1.src           
Summary        : Script to apply network provided settings
Description    :                                          
    This package provides the netconfig scripts to apply network
    provided settings like DNS or NIS into system files.

I’m waiting for the answer for few days, anyone know how to deal?

Your traceback needs to be read entirely to understand your problem, it’s truncated so you know it’s a problem in line 6 of some file but can’t know the name of the file. Somehow it’s also claiming to be missing a package named “pkg-resources” which I doubt exists(at least doesn’t exist on my system). And what is this “Reinstall python3-setuptools is not help” - Is that your addition and not part of the actual entry? If so, that’s bad to add your own comment to an entry, that’s confusing… Always add your comments in a separate paragraph and outside the code block so it’s clear it’s not part of the error.

In any case, sshuttle installs without error on my own 15.1,
So you might try force re-installing sshuttle by running the following command

zypper in -f sshuttle

TSU

Your traceback still mentions python2.7
Did you run the commands I suggested?

I’d also try removing “–python ‘/usr/bin/python2.7’”, and let it choose the default.

Have you confirmed that “/etc/resolv.conf” truly does not exist?

The python2-setuptools installation and reinstalling sshuttle save sshuttle, thank you very much to all the posters here.