Python – Equivalent to “source” in OpenBSD

environment-variableskshopenbsdpythonvirtualenv

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

which mean it is not in my path/installed. When I try to add it with pkg_add, it just tell me it can't find it. Does OpenBSD use something else that allows me to use venv or what should I do?

Best Answer

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

Related Question