Equivalent to “source” in OpenBSD?What is the difference between '.' and 'source' in shells?General...

As a new poet, where can I find help from a professional to judge my work?

CBP Reminds Travelers to Allow 72 Hours for ESTA. Why?

Pronunciation of powers

Is divide-by-zero a security vulnerability?

Most significant research articles for practical investors with research perspectives

Do authors have to be politically correct in article-writing?

How can I handle a player who pre-plans arguments about my rulings on RAW?

Equivalent to "source" in OpenBSD?

Is my plan for fixing my water heater leak bad?

What type of postprocessing gives the effect of people standing out

Find the next monthly expiration date

What is the wife of a henpecked husband called?

Can I become debt free or should I file for bankruptcy? How do I manage my debt and finances?

Is there any relevance to Thor getting his hair cut other than comedic value?

What am I? I am in theaters and computer programs

How do ISS astronauts "get their stripes"?

Why is working on the same position for more than 15 years not a red flag?

Why zero tolerance on nudity in space?

A "strange" unit radio astronomy

What to do when being responsible for data protection in your lab, yet advice is ignored?

What do the pedals on grand pianos do?

Where is the fallacy here?

What is this waxed root vegetable?

How to avoid being sexist when trying to employ someone to function in a very sexist environment?



Equivalent to “source” in OpenBSD?


What is the difference between '.' and 'source' in shells?General questions about OpenBSD source code and release datesopenBSD w/ KDE 3.5 - no text in menus or any gui'sSetting up IPSEC on LAN between two hosts (OpenBSD)Connect to commercial VPN on OpenBSD 5.9KSH script having trouble reading in variables line by lineCompiling Octave: how to add a new item to the include directories for Qt?GPAW can't find ase: ModuleNotFoundError: No module named 'ase'How to set environment variables to path so it can be read from GUI and command line from the same program?Connect external DAC / sound card in OpenBSDRHEL 6.8 installation of user specific python 3.7 completes with 'ModuleNotFoundError: No module named '_ctypes'













2















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?










share|improve this question

























  • 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


















2















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?










share|improve this question

























  • 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
















2












2








2


1






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?










share|improve this question
















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






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 5 hours ago









200_success

3,92711528




3,92711528










asked 11 hours ago









SalviatiSalviati

1146




1146













  • 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



















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












3 Answers
3






active

oldest

votes


















12














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?






share|improve this answer































    6














    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.






    share|improve this answer

































      -1














      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!






      share|improve this answer























        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
        });


        }
        });














        draft saved

        draft discarded


















        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









        12














        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?






        share|improve this answer




























          12














          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?






          share|improve this answer


























            12












            12








            12







            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?






            share|improve this 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




            • What is the difference between '.' and 'source' in shells?







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered 11 hours ago









            JdeBPJdeBP

            35.8k473171




            35.8k473171

























                6














                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.






                share|improve this answer






























                  6














                  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.






                  share|improve this answer




























                    6












                    6








                    6







                    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.






                    share|improve this answer















                    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.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited 10 hours ago

























                    answered 11 hours ago









                    BodoBodo

                    1,993314




                    1,993314























                        -1














                        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!






                        share|improve this answer




























                          -1














                          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!






                          share|improve this answer


























                            -1












                            -1








                            -1







                            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!






                            share|improve this answer













                            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!







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered 9 hours ago









                            Daniel PrydenDaniel Pryden

                            1896




                            1896






























                                draft saved

                                draft discarded




















































                                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.




                                draft saved


                                draft discarded














                                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





















































                                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







                                Popular posts from this blog

                                Couldn't open a raw socket. Error: Permission denied (13) (nmap)Is it possible to run networking commands...

                                VNC viewer RFB protocol error: bad desktop size 0x0I Cannot Type the Key 'd' (lowercase) in VNC Viewer...

                                Why not use the yoke to control yaw, as well as pitch and roll? Announcing the arrival of...