Equivalent to “source” in OpenBSD?
Trying to open a python3 virtual environment I have created with
python3 -m venv myVenv
by doing
source myVenv/bin/activate
as I do in Linux, but I get
ksh: source: not found
wich mean it is not in my path/installed. When I try to add it with pkg_add it just tell me it cant find it. Does OpenBSD use something else that allows me to use venv or what should I do?
python environment-variables ksh openbsd
add a comment |
Trying to open a python3 virtual environment I have created with
python3 -m venv myVenv
by doing
source myVenv/bin/activate
as I do in Linux, but I get
ksh: source: not found
wich mean it is not in my path/installed. When I try to add it with pkg_add it just tell me it cant find it. Does OpenBSD use something else that allows me to use venv or what should I do?
python environment-variables ksh openbsd
sourceis abashcommand. To switch tobashas your login shell, if this would make your life easier, install thebashport/package and update your login shell withchsh.bashwould be installed as/usr/local/bin/bashon OpenBSD.
– Kusalananda
10 hours ago
add a comment |
Trying to open a python3 virtual environment I have created with
python3 -m venv myVenv
by doing
source myVenv/bin/activate
as I do in Linux, but I get
ksh: source: not found
wich mean it is not in my path/installed. When I try to add it with pkg_add it just tell me it cant find it. Does OpenBSD use something else that allows me to use venv or what should I do?
python environment-variables ksh openbsd
Trying to open a python3 virtual environment I have created with
python3 -m venv myVenv
by doing
source myVenv/bin/activate
as I do in Linux, but I get
ksh: source: not found
wich mean it is not in my path/installed. When I try to add it with pkg_add it just tell me it cant find it. Does OpenBSD use something else that allows me to use venv or what should I do?
python environment-variables ksh openbsd
python environment-variables ksh openbsd
edited 4 hours ago
200_success
3,92711528
3,92711528
asked 11 hours ago
SalviatiSalviati
1146
1146
sourceis abashcommand. To switch tobashas your login shell, if this would make your life easier, install thebashport/package and update your login shell withchsh.bashwould be installed as/usr/local/bin/bashon OpenBSD.
– Kusalananda
10 hours ago
add a comment |
sourceis abashcommand. To switch tobashas your login shell, if this would make your life easier, install thebashport/package and update your login shell withchsh.bashwould be installed as/usr/local/bin/bashon OpenBSD.
– Kusalananda
10 hours ago
source is a bash command. To switch to bash as your login shell, if this would make your life easier, install the bash port/package and update your login shell with chsh. bash would be installed as /usr/local/bin/bash on OpenBSD.– Kusalananda
10 hours ago
source is a bash command. To switch to bash as your login shell, if this would make your life easier, install the bash port/package and update your login shell with chsh. bash would be installed as /usr/local/bin/bash on OpenBSD.– Kusalananda
10 hours ago
add a comment |
3 Answers
3
active
oldest
votes
You are using the Forsyth PD Korn shell, the usual login shell on OpenBSD. The PD Korn shell does not have a source command. The source built-in command is only available in some shells. The command that you want is the . command.
Further reading
- What is the difference between '.' and 'source' in shells?
add a comment |
The source keyword which is available in bash is not part of the Posix standard. Instead you can use
. myVenv/bin/activate
You could use the same syntax with . in bash which you are using on your Linux system.
add a comment |
As an alternative, you can simply launch a new bash shell, and source it there:
ksh$ bash
bash$ source myVenv/bin/activate
(myVenv) bash$ python ...
As a bonus, this gives you an easy way to deactivate the venv and return to a pristine environment: just exit from the bash shell and you'll return to ksh!
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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%2funix.stackexchange.com%2fquestions%2f504305%2fequivalent-to-source-in-openbsd%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
You are using the Forsyth PD Korn shell, the usual login shell on OpenBSD. The PD Korn shell does not have a source command. The source built-in command is only available in some shells. The command that you want is the . command.
Further reading
- What is the difference between '.' and 'source' in shells?
add a comment |
You are using the Forsyth PD Korn shell, the usual login shell on OpenBSD. The PD Korn shell does not have a source command. The source built-in command is only available in some shells. The command that you want is the . command.
Further reading
- What is the difference between '.' and 'source' in shells?
add a comment |
You are using the Forsyth PD Korn shell, the usual login shell on OpenBSD. The PD Korn shell does not have a source command. The source built-in command is only available in some shells. The command that you want is the . command.
Further reading
- What is the difference between '.' and 'source' in shells?
You are using the Forsyth PD Korn shell, the usual login shell on OpenBSD. The PD Korn shell does not have a source command. The source built-in command is only available in some shells. The command that you want is the . command.
Further reading
- What is the difference between '.' and 'source' in shells?
answered 10 hours ago
JdeBPJdeBP
35.8k473171
35.8k473171
add a comment |
add a comment |
The source keyword which is available in bash is not part of the Posix standard. Instead you can use
. myVenv/bin/activate
You could use the same syntax with . in bash which you are using on your Linux system.
add a comment |
The source keyword which is available in bash is not part of the Posix standard. Instead you can use
. myVenv/bin/activate
You could use the same syntax with . in bash which you are using on your Linux system.
add a comment |
The source keyword which is available in bash is not part of the Posix standard. Instead you can use
. myVenv/bin/activate
You could use the same syntax with . in bash which you are using on your Linux system.
The source keyword which is available in bash is not part of the Posix standard. Instead you can use
. myVenv/bin/activate
You could use the same syntax with . in bash which you are using on your Linux system.
edited 10 hours ago
answered 10 hours ago
BodoBodo
1,993314
1,993314
add a comment |
add a comment |
As an alternative, you can simply launch a new bash shell, and source it there:
ksh$ bash
bash$ source myVenv/bin/activate
(myVenv) bash$ python ...
As a bonus, this gives you an easy way to deactivate the venv and return to a pristine environment: just exit from the bash shell and you'll return to ksh!
add a comment |
As an alternative, you can simply launch a new bash shell, and source it there:
ksh$ bash
bash$ source myVenv/bin/activate
(myVenv) bash$ python ...
As a bonus, this gives you an easy way to deactivate the venv and return to a pristine environment: just exit from the bash shell and you'll return to ksh!
add a comment |
As an alternative, you can simply launch a new bash shell, and source it there:
ksh$ bash
bash$ source myVenv/bin/activate
(myVenv) bash$ python ...
As a bonus, this gives you an easy way to deactivate the venv and return to a pristine environment: just exit from the bash shell and you'll return to ksh!
As an alternative, you can simply launch a new bash shell, and source it there:
ksh$ bash
bash$ source myVenv/bin/activate
(myVenv) bash$ python ...
As a bonus, this gives you an easy way to deactivate the venv and return to a pristine environment: just exit from the bash shell and you'll return to ksh!
answered 8 hours ago
Daniel PrydenDaniel Pryden
1896
1896
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- 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%2funix.stackexchange.com%2fquestions%2f504305%2fequivalent-to-source-in-openbsd%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
sourceis abashcommand. To switch tobashas your login shell, if this would make your life easier, install thebashport/package and update your login shell withchsh.bashwould be installed as/usr/local/bin/bashon OpenBSD.– Kusalananda
10 hours ago