-
-
Notifications
You must be signed in to change notification settings - Fork 11.3k
Python still uses local python sys.path #13260
Comments
You are right and I have a pull request for the python formula that fixes this among some other things. I am on the iPhone right now, so I can't give you the link. Look through the open pull requests for my username. Feel free to try my attempt. |
That's right it's #12968 so I'll just close this issue. It seems to address the problem addid the -L compiler flag workaround. Related to this python bug: http://bugs.python.org/issue11445 UPDATE Tried @samueljohn branch but it doesn't solve the issue. |
I'm reopening this issue because #12968 acctually doesn;t solve it. |
Well, actually that is a feature not a bug, @eduardocereto. See the discussion on the python list. At least it is intended by Python. Though, one core dev was "+0" about it as I read from the mailing list. Framework builds of python include But still, I see your issue that pip wants to remove old packages installed there and fails without What bothers me more is that there is no directory searched only by systems python and not by homebrew-python except the stuff in |
That's really unfortunate. This bug clearly don't belong here then. I'll have to suck it. I'll most probably just pop the dirs I don't want from sys.path. I thought it was a bug on the packaging since for me it's something I would never expect. @samueljohn thanks again for digging into this |
@eduardocereto, thanks for reporting! Sorry that I don't have a good solution at hand. I mean, if we come to the conclusion, it's better to build python in homebrew without |
Just for the record (and if you come here by a search engine): A brewed Python uses what it finds in But brewed Python now avoids any things pointing to |
For me it only happens for Python2, maybe because I don't have python3 on my machine other than the version from Homebrew.
It's a bad idea to inherit the paths from the system because when you try to install an updated package pip will try to remove the previous package from the system and it fails unless you use sudo.
When running python you can see that
sys.path
contains/Library/Python/2.7/site-packages
. It should only contain paths to the cellar site-packages.The text was updated successfully, but these errors were encountered: