tor name not recognized in stem

十年热恋 提交于 2019-12-13 21:26:43

问题


I am trying to follow the "to russia with love" tutorial (https://stem.torproject.org/tutorials/to_russia_with_love.html) but I am getting this error:

[1mStarting Tor:
[0m
Traceback (most recent call last):
  File "C:\Users\gatsu\My Documents\LiClipse Workspace\TorCommunicator\tutorialStart.py", line 52, in <module>
    init_msg_handler = print_bootstrap_lines,
  File "C:\Python34\lib\site-packages\stem\process.py", line 244, in launch_tor_with_config
    return launch_tor(tor_cmd, args, torrc_path, completion_percent, init_msg_handler, timeout, take_ownership)
  File "C:\Python34\lib\site-packages\stem\process.py", line 83, in launch_tor
    raise OSError("'%s' isn't available on your system. Maybe it's not in your PATH?" % tor_cmd)
OSError: 'tor' isn't available on your system. Maybe it's not in your PATH?

What am I missing? Do I need to import something to my project or add some Tor PATH? I am using windows 8.1.


回答1:


That means Stem doesn't know where the tor executable is located. Your PATH tells applications like Stem where to look for executables and tor isn't located in any of those locations.

You have a couple options...

a. Tell Stem explicitly where tor is located...

stem.process.launch_tor_with_config(tor_cmd='C:\path\to\tor', ...)

b. Change your path to include tor.



来源:https://stackoverflow.com/questions/29805260/tor-name-not-recognized-in-stem

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