ZSH: command not found but should be in PATH?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
This has been asked a thousand times, and I've run through a thousand suggestions and now have things more messed up than when i started, but i think i'm now to a place where maybe i can get it fixed if i can get pointed in the right direction
I just switched over from terminal on my mac to (trying to run) zsh on iterm2 and i can't seem to get python scripts to run as expected, in terminal everything ran fine (i installed everything through anaconda)
i'm sure it's something with my PATH variable, but I don't quite understand what is going on
i can only get scripts to run if i source my bash profile and then run it through bash
> echo $PATH
~/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
bash: python3: command not found
bash-3.2$ exit
exit
> source ~/.bash_profile
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
Python 3.6.4 :: Anaconda custom (64-bit)
bash-3.2$
the only thing in my .bash_profile is:
export PATH="~/anaconda3/bin:$PATH"
any idea what i have messed up along the way?
thanks
zsh iterm2 oh-my-zsh zshrc
add a comment |
This has been asked a thousand times, and I've run through a thousand suggestions and now have things more messed up than when i started, but i think i'm now to a place where maybe i can get it fixed if i can get pointed in the right direction
I just switched over from terminal on my mac to (trying to run) zsh on iterm2 and i can't seem to get python scripts to run as expected, in terminal everything ran fine (i installed everything through anaconda)
i'm sure it's something with my PATH variable, but I don't quite understand what is going on
i can only get scripts to run if i source my bash profile and then run it through bash
> echo $PATH
~/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
bash: python3: command not found
bash-3.2$ exit
exit
> source ~/.bash_profile
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
Python 3.6.4 :: Anaconda custom (64-bit)
bash-3.2$
the only thing in my .bash_profile is:
export PATH="~/anaconda3/bin:$PATH"
any idea what i have messed up along the way?
thanks
zsh iterm2 oh-my-zsh zshrc
Have you tried${HOME}/instead of~/?
– Matthieu Brucher
Nov 16 '18 at 15:20
thanks, that did it -- i think i had tried that before, but put in the wrong place -- for anyone else poking around, i added this like to my .zshrc fileexport PATH=${HOME}/anaconda3/bin:$PATH
– J. Doe
Nov 16 '18 at 15:58
Turning into an answer, as it solved the problem with '~'.
– Matthieu Brucher
Nov 16 '18 at 16:02
add a comment |
This has been asked a thousand times, and I've run through a thousand suggestions and now have things more messed up than when i started, but i think i'm now to a place where maybe i can get it fixed if i can get pointed in the right direction
I just switched over from terminal on my mac to (trying to run) zsh on iterm2 and i can't seem to get python scripts to run as expected, in terminal everything ran fine (i installed everything through anaconda)
i'm sure it's something with my PATH variable, but I don't quite understand what is going on
i can only get scripts to run if i source my bash profile and then run it through bash
> echo $PATH
~/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
bash: python3: command not found
bash-3.2$ exit
exit
> source ~/.bash_profile
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
Python 3.6.4 :: Anaconda custom (64-bit)
bash-3.2$
the only thing in my .bash_profile is:
export PATH="~/anaconda3/bin:$PATH"
any idea what i have messed up along the way?
thanks
zsh iterm2 oh-my-zsh zshrc
This has been asked a thousand times, and I've run through a thousand suggestions and now have things more messed up than when i started, but i think i'm now to a place where maybe i can get it fixed if i can get pointed in the right direction
I just switched over from terminal on my mac to (trying to run) zsh on iterm2 and i can't seem to get python scripts to run as expected, in terminal everything ran fine (i installed everything through anaconda)
i'm sure it's something with my PATH variable, but I don't quite understand what is going on
i can only get scripts to run if i source my bash profile and then run it through bash
> echo $PATH
~/bin:/anaconda3/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
bash: python3: command not found
bash-3.2$ exit
exit
> source ~/.bash_profile
> python3 --version
zsh: command not found: python3
> bash
bash-3.2$ python3 --version
Python 3.6.4 :: Anaconda custom (64-bit)
bash-3.2$
the only thing in my .bash_profile is:
export PATH="~/anaconda3/bin:$PATH"
any idea what i have messed up along the way?
thanks
zsh iterm2 oh-my-zsh zshrc
zsh iterm2 oh-my-zsh zshrc
edited Nov 16 '18 at 15:20
Matthieu Brucher
17.7k52445
17.7k52445
asked Nov 16 '18 at 15:14
J. DoeJ. Doe
134
134
Have you tried${HOME}/instead of~/?
– Matthieu Brucher
Nov 16 '18 at 15:20
thanks, that did it -- i think i had tried that before, but put in the wrong place -- for anyone else poking around, i added this like to my .zshrc fileexport PATH=${HOME}/anaconda3/bin:$PATH
– J. Doe
Nov 16 '18 at 15:58
Turning into an answer, as it solved the problem with '~'.
– Matthieu Brucher
Nov 16 '18 at 16:02
add a comment |
Have you tried${HOME}/instead of~/?
– Matthieu Brucher
Nov 16 '18 at 15:20
thanks, that did it -- i think i had tried that before, but put in the wrong place -- for anyone else poking around, i added this like to my .zshrc fileexport PATH=${HOME}/anaconda3/bin:$PATH
– J. Doe
Nov 16 '18 at 15:58
Turning into an answer, as it solved the problem with '~'.
– Matthieu Brucher
Nov 16 '18 at 16:02
Have you tried
${HOME}/ instead of ~/?– Matthieu Brucher
Nov 16 '18 at 15:20
Have you tried
${HOME}/ instead of ~/?– Matthieu Brucher
Nov 16 '18 at 15:20
thanks, that did it -- i think i had tried that before, but put in the wrong place -- for anyone else poking around, i added this like to my .zshrc fileexport PATH=${HOME}/anaconda3/bin:$PATH
– J. Doe
Nov 16 '18 at 15:58
thanks, that did it -- i think i had tried that before, but put in the wrong place -- for anyone else poking around, i added this like to my .zshrc fileexport PATH=${HOME}/anaconda3/bin:$PATH
– J. Doe
Nov 16 '18 at 15:58
Turning into an answer, as it solved the problem with '~'.
– Matthieu Brucher
Nov 16 '18 at 16:02
Turning into an answer, as it solved the problem with '~'.
– Matthieu Brucher
Nov 16 '18 at 16:02
add a comment |
1 Answer
1
active
oldest
votes
To avoid any issue with the definition of ~, use $HOME instead.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53340578%2fzsh-command-not-found-but-should-be-in-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
To avoid any issue with the definition of ~, use $HOME instead.
add a comment |
To avoid any issue with the definition of ~, use $HOME instead.
add a comment |
To avoid any issue with the definition of ~, use $HOME instead.
To avoid any issue with the definition of ~, use $HOME instead.
answered Nov 16 '18 at 16:01
Matthieu BrucherMatthieu Brucher
17.7k52445
17.7k52445
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53340578%2fzsh-command-not-found-but-should-be-in-path%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Have you tried
${HOME}/instead of~/?– Matthieu Brucher
Nov 16 '18 at 15:20
thanks, that did it -- i think i had tried that before, but put in the wrong place -- for anyone else poking around, i added this like to my .zshrc fileexport PATH=${HOME}/anaconda3/bin:$PATH
– J. Doe
Nov 16 '18 at 15:58
Turning into an answer, as it solved the problem with '~'.
– Matthieu Brucher
Nov 16 '18 at 16:02