Reputation: 43417
On a rMBP here. I'm not sure what the script is that is responsible for doing this. Basically I want to add the path to python utils to the $PATH
...
For example, I brewed python brew python
in order to get pip
, then ran pip install flake8
. Now
$ which flake8
flake8 not found
$ find / | grep flake8
...
......
/usr/local/share/python/flake8
$ ls -la /usr/local/share/python/
total 32
drwxr-xr-x 6 lust admin 204 Apr 2 18:15 .
drwxr-xr-x 15 lust admin 510 Apr 2 18:12 ..
lrwxr-xr-x 1 lust admin 45 Apr 2 18:13 Extras -> ../../Cellar/python/2.7.3/share/python/Extras
-rwxr-xr-x 1 lust admin 389 Apr 2 18:15 flake8
-rwxr-xr-x 1 lust admin 385 Apr 2 18:15 pep8
-rwxr-xr-x 1 lust admin 405 Apr 2 18:15 pyflakes
Alright!
$ cat /private/etc/paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
$ sudo vim /private/etc/paths
$ cat /private/etc/paths
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
/usr/local/share/python
Make a new shell, check $PATH
, python not there. Okay.
Reboot, start a new shell, check $PATH
, python still not there.
Oh, by the way, the solution is not to append, with anything like export PATH=$PATH:newpath
, because I don't actually care to run flake8
from the command-line, I want Sublime Text 3' SublimeLinter plugin to actually know where it is without putting some hacky config in the settings for the editor.
Upvotes: 0
Views: 535
Reputation: 43417
I found the problem. As part of oh-my-zsh, zsh is set up to set PATH in the ~/.zshrc
. I failed to consider this. When starting ST3 without using the command line invocation, it gains its own (incorrect) path environment variable, so that part still doesn't work. The ultimate resolution to the problem, however, is here.
Upvotes: 2