python - TOR with python stem (basic) - 'tor' 不在 PATH 中

标签 python python-3.x tor system-paths

我正在尝试将 .onion 网站的内容导入 python,一些研究表明 'stem ' 当我运行这个 tutorial script ,或更具体地说,当我尝试使用 stem.process.launch_tor_with_config 时,出现此错误:

'tor' isn't available on your system. Maybe it's not in your PATH?

我应该安装某种 tor 进程,我得到了 tor 浏览器包并将/Tor 库(带有 tor.exe)放在我的路径中,但它没有帮助...... 显然我遗漏了一些非常基本的东西,请指教....

非常感谢...

最佳答案

我在我的 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,
)

关于python - TOR with python stem (basic) - 'tor' 不在 PATH 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24801924/

相关文章:

java - 是否有易于破解的开源 Tivo 媒体服务器?

python - 如何获取名为捕获组的正则表达式的名称?

python - Python3 中 random.choice(list) 的大 O 复杂度

python - 如何创建类似于 current_user 的函数?

python - Python 有流式正则表达式模块吗?

tor - 无法创建单跳电路(单跳隧道)

python - 接受参数 : Missing 1 required positional argument 的 flask get 方法

Python : Something unexpected is happening in my code. ...?

python - 使用 Selenium WebDriver + Tor 作为代理

python - Tor + Urllib2 Python