Is there a Pathlib alternate for os.path.join? January 18, 2023 by Tarik Yes there is: env_path = Path(__file__).parent / ".env" / is all you need. This will work in different OSs