-
Notifications
You must be signed in to change notification settings - Fork 847
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pwndbg import fails when not using virtual environment and not running gdb from pwndbg directory #1866
Comments
The |
@fidgetingbits Is there a reason you don't want to use virtual environment? Is this related to the issue we discussed on Discord where Pwndbg sources gets installed into virtualenv? This is something we may not want it to be doing. |
Ya it's the same issue, which I didnt look into closer. I just stopped using venv as I didn't want to deal with recopying the files into the venv, or rebuilding the venv every time. Better to fix the venv I guess, but in the mean time while not using it I couldn't use a bunch of my other scripts, so decided to file this anyway. Fine to close if you think not worth fixing. |
This must be caused by this change: https://github.com/pwndbg/pwndbg/pull/1843/files#diff-4209d788ad32c40cbda3c66b3de47eefb929308ca703bb77a6382625986add17R192 This made it so that instead of installing just the requirements we install the whole description from pyproject.toml as a whole pwndbg package. Hmm... |
Hmm pretty sure that this may resolve our issue: https://stackoverflow.com/questions/35064426/when-would-the-e-editable-option-be-useful-with-pip-install |
So that seems to work if I replace -U with -e. If I use both -e and -U it doesn't. I'm not sure how much it matters if we don't use -U. By using -e, we end up with something like:
I'll send a PR tomorrow. |
@fidgetingbits this has been fixed in #1877 right? Closing this for now |
Description
If you don't want to use the virtual environment you now have to tell
gdbinit.py
to skip it by setting an environment variable:This will then skip the stuff requiring setup.sh and then
import pwndbg
. I found while doing this I was getting an error about not findingpwndbg
:The solution for me was to just add the following in the
if venv_path == "PWNDBG_PLEASE_SKIP_VENV":
condition blockBut I'm not really sure this is what you would want so I'm not sending it as a pull request, but it seems useful to be able to source gdbinit.py without having to be in the pwndbg directory. I believe this used to work on earlier versions...
Steps to reproduce
source <path_to_pwndbg>/gdbinit.py
from gdb, when cwd is not the pwndbg directoryMy setup
The text was updated successfully, but these errors were encountered: