voltron icon indicating copy to clipboard operation
voltron copied to clipboard

install.sh uses wrong site-packages dir on macOS

Open snare opened this issue 7 years ago • 5 comments

/S/L instead of /L

site.getsitepackages() ['/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/site-python', '/Library/Python/2.7/site-packages']

Need to check where it was installed I guess

snare avatar Dec 12 '16 22:12 snare

Is this still the case with the latest master version?

nateozem avatar May 04 '17 12:05 nateozem

The install script defaults to installing with --user now so this will only be if you do ./install.sh -s but I'll have to investigate.

snare avatar May 04 '17 15:05 snare

Oh the problem is just that it reports that it's installed to /S/L and puts that in the lldbinit when it's actually installed to /L. It lets pip do the install to the right place but it uses the path it gets from LLDB to the site-packages which it returns as /S/L.

snare avatar May 04 '17 16:05 snare

How about using sys.prefix if didn't use --user for installation?

nateozem avatar May 06 '17 01:05 nateozem

Below are results from printing sys.prefix and execute with option of --user-site

system path

$ /usr/bin/python -c 'import sys; print sys.prefix'
/System/Library/Frameworks/Python.framework/Versions/2.7

$ /usr/local/bin/python -c 'import sys; print sys.prefix'
/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7

user path

$ /usr/bin/python -m site --user-site
/Users/nate/Library/Python/2.7/lib/python/site-packages

$ /usr/local/bin/python -m site --user-site
/Users/nate/Library/Python/2.7/lib/python/site-packages

With this info, we may see what is the installation path for system and user. For system installation, path may different depending on what python interpretor is used.

nateozem avatar May 06 '17 11:05 nateozem