5

I'm trying to get an .onion website's content to python, a little research showed that 'stem' and as i am running this tutorial script, or more specifically, when i'm trying to use stem.process.launch_tor_with_config, i get this error:

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

I supposed to have some sort of tor process installed, I got the tor browser bundle and put the /Tor library (with the tor.exe) in it in my path, and it's not helping... Obviously I'm missing something VERY BASIC, please advise....

Many thanks...

Mr. Nun.
  • 775
  • 11
  • 29

1 Answers1

5

I had the same issue on my Mac. Try specifying exactly where the tor file is located to the tor_cmd parameter:

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,
)
abpai
  • 108
  • 1
  • 5
  • there it is: http://stackoverflow.com/questions/25114593/stem-as-python-tor-client-stuck-on-loading-descriptors – Mr. Nun. Aug 04 '14 at 08:34
  • @abpai I am running into the same problem. But I can't find the tor.real file anywhere. I am running Ubuntu 14.04 on VirtualBox and there's a file known as tor in the `/tor-browser_en-US/Browser/TorBrowser/Tor` folder but I am not sure if its the same one since when I add this path, it gives an error. Could you please help? – QPTR Feb 07 '16 at 10:57
  • 3
    Nowadays (in _MacOs Sierra_) the `tor_cmd` right path is: `/Applications/TorBrowser.app/Contents/MacOS/Tor/tor.real` – juancb Jan 31 '17 at 11:15