[Python] What is the Folder being referenced in PYTHONPATH?

Discussão em 'Python' iniciado por Stack, Agosto 12, 2025.

  1. Stack

    Stack Membro Participativo

    I need to add a directory to my PYTHONPATH variable based on directions from a project that state the following:

    Modify your ~/.bashrc file by adding the following line
    export PYTHONPATH=$PYTHONPATH:YourFolder/Dir-Folder/


    What would YourFolder be in this case if I am using a mac and Dir-Folder is under Mac-HD/Users/username/Dir-Folder?

    When I'm in terminal and I run python then run print(sys.path), Dir-Folder doesn't show up. I currently have it set as:

    export PYTHONPATH=$PYTHONPATH:~/Dir-Folder/

    Continue reading...

Compartilhe esta Página