{"id":18969214,"url":"https://github.com/miguelgargallo/pythonmanager","last_synced_at":"2026-04-05T15:30:20.416Z","repository":{"id":209292142,"uuid":"723676045","full_name":"miguelgargallo/pythonmanager","owner":"miguelgargallo","description":"Switch Python Version for AI","archived":false,"fork":false,"pushed_at":"2023-11-26T13:23:33.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-18T02:06:15.994Z","etag":null,"topics":["alias","powershell","python","version"],"latest_commit_sha":null,"homepage":"https://miguelgargallo.com","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miguelgargallo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"License","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-26T12:36:31.000Z","updated_at":"2023-11-26T12:47:08.000Z","dependencies_parsed_at":"2023-11-26T14:46:58.871Z","dependency_job_id":null,"html_url":"https://github.com/miguelgargallo/pythonmanager","commit_stats":null,"previous_names":["miguelgargallo/python-switch","miguelgargallo/python-version-management"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgargallo%2Fpythonmanager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgargallo%2Fpythonmanager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgargallo%2Fpythonmanager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miguelgargallo%2Fpythonmanager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miguelgargallo","download_url":"https://codeload.github.com/miguelgargallo/pythonmanager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239966220,"owners_count":19726283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alias","powershell","python","version"],"created_at":"2024-11-08T14:52:14.195Z","updated_at":"2026-04-05T15:30:20.343Z","avatar_url":"https://github.com/miguelgargallo.png","language":null,"readme":"# Python Manager\n\nThis repository outlines scripts and configurations for managing multiple Python environments. It facilitates easy switching between two Python versions, referred to as `p0` and `p2`.\n\n## Setup\n\n### Bash Configuration\n\nTo set up the aliases in Bash for environment switching, add these lines to your `.bashrc` or `.bash_profile`:\n\n```bash\nalias p0='/path/to/python310/python'\nalias p2='/path/to/python312/python'\nalias p0m='/path/to/python310/python -m pip'\nalias p2m='/path/to/python312/python -m pip'\nalias p0i='/path/to/python310/python -m pip install'\nalias p2i='/path/to/python312/python -m pip install'\n```\n\nReplace `/path/to/python310` and `/path/to/python312` with the actual paths to your Python installations.\n\n### PowerShell Configuration\n\nFor PowerShell users, include this function in your PowerShell profile script (typically located at `$HOME\\Documents\\WindowsPowerShell\\Microsoft.PowerShell_profile.ps1`):\n\n```powershell\nfunction Set-PythonEnvironment {\n    param (\n        [string]$version\n    )\n    if ($version -eq \"p0\") {\n        $Global:PYTHON_COMMAND = \"/path/to/python310/python\"\n    } elseif ($version -eq \"p2\") {\n        $Global:PYTHON_COMMAND = \"/path/to/python312/python\"\n    } else {\n        Write-Host \"Version not recognized.\"\n    }\n\n    $Global:PIP_COMMAND = \"$Global:PYTHON_COMMAND -m pip\"\n}\n\nfunction python {\n    \u0026 $Global:PYTHON_COMMAND $args\n}\n\nfunction pip {\n    \u0026 $Global:PIP_COMMAND $args\n}\n```\n\nReplace `/path/to/python310` and `/path/to/python312` with your specific Python paths.\n\n## Usage\n\n### In Bash\n- Switch environments using `p0` for Python 310 and `p2` for Python 312.\n- Directly install packages using `p0i package_name` for Python 310 and `p2i package_name` for Python 312.\n\n### In PowerShell\n- Set the environment using `Set-PythonEnvironment p0` for Python 310 or `Set-PythonEnvironment p2` for Python 312.\n- Run Python scripts with `python script_name.py`.\n- Manage Python packages with `pip install package_name`.\n\n![image](https://github.com/miguelgargallo/pythonmanager/assets/5947268/df70f2ed-bcee-4661-9ba3-87f951fff391)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelgargallo%2Fpythonmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiguelgargallo%2Fpythonmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiguelgargallo%2Fpythonmanager/lists"}