The three main files in this repo, starter.py, header.py, and tracker.py, can be used to patch and get the pip
version of Nyx 2.1.0 (A monitor tool for Tor) to run natively on Windows 11, Windows 10, or Windows 8.
This is done by simply removing the scripts' dependency on the get_uid
attribute, and replacing instances of os.uname
with platform.uname
(Credit: lunaken), in order to run to completion. Not exactly a strategy that expert coders would've used (which I'm probably not), but it works in this case.
- Python 3 downloaded from https://www.python.org/downloads/ (I've tested with Python 3.9. Using the Microsoft Store versions has not yet been tested, since folder filepaths used by Microsoft Store apps tend to change often.)
- An up-to-date version of
pip
orpip3
within Python 3 - (Optional but recommended) Voidtools Everything to quickly find file locations
- In accordance with https://nyx.torproject.org/#download, open PowerShell and run
pip install nyx
- Once it has been installed, run
nyx
- If you encounter the error
ImportError: No module named '_curses'
: Install windows-curses withpip install windows-curses
. (Credit: Bruno Ranieri) - If you encounter an error about not being able to find
control_auth_cookie
: My understanding is that this can occur if Tor has been placed inC:\Program Files
, since Tor on Windows lacks admin rights and will save new files to%LOCALAPPDATA%\VirtualStore
instead. This can be fixed by pointing to the file's actual location intorrc
withCookieAuthFile ______________\Data\control_auth_cookie
- If you receive an error about
get_uid
: Right-click on header.py, chooseSave As...
, and overwrite the defaultheader.py
file. In my case with Python 3.9, it was in%LOCALAPPDATA%\Programs\Python\Python39\Lib\site-packages\nyx\panel\header.py
- If you receive an error about
uname
: Right-click on starter.py, chooseSave as...
, and overwrite the defaultstarter.py
file. In my case with Python 3.9, it was in%LOCALAPPDATA%\Programs\Python\Python39\Lib\site-packages\nyx\starter.py
- If the "Graph / Log" page gets clogged with
[NYX_Warning] Event listener raised an uncaught exception (module 'os' has no attribute 'uname'): BW x x
every 1-2 seconds: Right-click on tracker.py, chooseSave as...
, and overwrite the defaulttracker.py
file. In my case with Python 3.9, it was in%LOCALAPPDATA%\Programs\Python\Python39\Lib\site-packages\nyx\tracker.py
None as of 9th of February 2022.