问题
My search path for Python packages contains an entry for my system's site packages in
/Library/Python/2.7/site-packages
This has always been there, but now that I have installed Homebrew's Python, it has been suggested that I remove it (assuming this is safe and makes sense) from the package search path for Homebrew's Python. But I'm not sure how (or how it even gets there: I don't add it to PYTHONPATH, for example).
How do I remove my system's site-packages from the search path that Brew's Python uses for packages?
回答1:
The easiest option is to pass -S to python on the command line, as described in the documentation.
来源:https://stackoverflow.com/questions/27969220/how-do-i-remove-my-systems-site-packages-from-the-search-path-for-python-pack