使用Python Stem的TOR(基础) - 'tor'不在PATH中
1 个回答
5
我在我的Mac上也遇到了同样的问题。试着在tor_cmd参数中准确指定tor文件的位置:
tor_process = stem.process.launch_tor_with_config(
tor_cmd = '/Applications/TorBrowser.app/Tor/tor.real',
config = { SocksPort': str(SOCKS_PORT),
'ExitNodes': '{ru}',},
init_msg_handler = print_bootstrap_lines,
)