{"id":18827208,"url":"https://github.com/mikedacre/conda_pyenv_switch","last_synced_at":"2026-05-17T11:34:12.293Z","repository":{"id":150740718,"uuid":"139065955","full_name":"MikeDacre/conda_pyenv_switch","owner":"MikeDacre","description":"A simple zsh function to switch anaconda and pyenv in the PATH","archived":false,"fork":false,"pushed_at":"2018-06-28T21:36:50.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-07T19:08:47.357Z","etag":null,"topics":["anaconda","oh-my-zsh","pyenv","shell","zsh"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikeDacre.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-28T20:37:34.000Z","updated_at":"2018-06-28T21:37:12.000Z","dependencies_parsed_at":"2023-04-12T06:22:52.548Z","dependency_job_id":null,"html_url":"https://github.com/MikeDacre/conda_pyenv_switch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MikeDacre/conda_pyenv_switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeDacre%2Fconda_pyenv_switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeDacre%2Fconda_pyenv_switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeDacre%2Fconda_pyenv_switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeDacre%2Fconda_pyenv_switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeDacre","download_url":"https://codeload.github.com/MikeDacre/conda_pyenv_switch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeDacre%2Fconda_pyenv_switch/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259768509,"owners_count":22908228,"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":["anaconda","oh-my-zsh","pyenv","shell","zsh"],"created_at":"2024-11-08T01:13:19.268Z","updated_at":"2026-05-17T11:34:07.274Z","avatar_url":"https://github.com/MikeDacre.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# conda_pyenv_switch\nA simple zsh function to switch anaconda and pyenv in the PATH\n\npyenv is great, but if you install an anaconda version in pyenv that you use\nheavily, you can easily clobber your entire shell. The reason is that conda\nhosts so many different things, including some shell replacements, and pyenv\nprovides shims for every executable... so you end up with anaconda versions of\nstuff in your path that destroy everything.\n\nThe solution for me is to use a primary anaconda separately from pyenv, I use\nthe conda install for most of my scientific programming, but I keep pyenv for\nsome things, particularly testing or really easy virtualenvs.\n\nThe two don't play well together though, so my solution is to detect if both\n~/anconda[3] and ~/.pyenv exist and then if so provided two functions:\n\n- `use_pyenv`\n- `use_conda`\n\nThese functions just munge the path to flip the priority of the two, so\n`use_pyenv` make the PATH `$HOME/.pyenv/bin:$HOME/anaconda3/bin:...`, and\n`use_conda` just flips those two.\n\nNote: This is a dumb way of doing this, it could easily be written smaller, more\ncompact, more efficient. I just don't care enough, it is a quick job.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikedacre%2Fconda_pyenv_switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikedacre%2Fconda_pyenv_switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikedacre%2Fconda_pyenv_switch/lists"}