lnet
                                
                                 lnet copied to clipboard
                                
                                    lnet copied to clipboard
                            
                            
                            
                        How to build / run lnet without pip3 install?
I want to experiment with this tool and modify it. How do I run it from source, not via pip3 install?
git clone [email protected]:cdecker/lnet.git
cd lnet/
virtualenv -p (which python3) venv
./venv/bin/pip install -r requirements.txt
./venv/bin/pip install requests
./venv/bin/pip install --editable .
./venv/bin/lnet-cli
Or instead of always typing the ./venv/bin/ prefix you could call source venv/bin/activate (on bash) and call pip, python and lnet-cli/lnet-daemon directly.
Might be a typo in virtualenv -p (which python3) venv, as it gives me bash: syntax error near unexpected token `('. Works if I copy the path returned by which python3 manually though.
Installed this way, ln-cli works (well, modulo #4), but how do I recompile the code? I included print("foo") right after print("Starting") in web.py, ran ./venv/bin/pip install --editable . once again, and launched ln-cli, but foo wasn't printed.
(Sorry, I forgot I was using fish syntax for the (which) thing.)
The --editable flag was supposed to just create symlinks so you could edit the source and it would be reflected in the executables without having to install again or do anything. But even if it fails, installing again should yield you the correct results.
I've tested it by adding a print('aaa') statement at the beginning of bin/lnet-cli file and it worked. I don't understand why it isn't working for you.
Ok, I was confusing two copies of lncli on my machine; now when I have only one, adding print("aaa") to bin/lnet-cli achieves the expected result. However, modifying lnet/web.py doesn't...
Where did you add the print statement, and how are you starting the script?
I can't get the example graph to run from the repo. Setup:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
pip install requests
pip install --editable .
Run lnet-daemon and lnet-cli start <file-containing-graph-from-readme>. Daemon logs:
Starting graph
Starting
Starting server
Seems to get stuck here