{"id":15658731,"url":"https://github.com/ofek/pybin","last_synced_at":"2025-05-05T16:45:45.892Z","repository":{"id":62578936,"uuid":"102043948","full_name":"ofek/pybin","owner":"ofek","description":"Cross-platform tool to put Python's user bin in PATH, no sudo/runas required!","archived":false,"fork":false,"pushed_at":"2019-04-14T16:10:27.000Z","size":37,"stargazers_count":22,"open_issues_count":4,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T22:32:12.562Z","etag":null,"topics":["cli","linux","macos","packaging","python","scripts","windows","workaround"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ofek.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-31T20:53:58.000Z","updated_at":"2023-10-31T02:59:05.000Z","dependencies_parsed_at":"2022-11-03T20:47:33.690Z","dependency_job_id":null,"html_url":"https://github.com/ofek/pybin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fpybin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fpybin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fpybin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ofek%2Fpybin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ofek","download_url":"https://codeload.github.com/ofek/pybin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252535651,"owners_count":21763986,"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":["cli","linux","macos","packaging","python","scripts","windows","workaround"],"created_at":"2024-10-03T13:13:46.681Z","updated_at":"2025-05-05T16:45:45.877Z","avatar_url":"https://github.com/ofek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"pybin\n=====\n\n.. image:: https://img.shields.io/pypi/v/pybin.svg?style=flat-square\n    :target: https://pypi.org/project/pybin\n    :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pybin.svg?style=flat-square\n    :target: https://pypi.org/project/pybin\n    :alt: Supported Python versions\n\n.. image:: https://img.shields.io/pypi/l/pybin.svg?style=flat-square\n    :target: https://choosealicense.com/licenses\n    :alt: License\n\n-----\n\nWhen you install a package via ``pip install --user ...``, any executables get\nplaced in a special directory specifically for the intended user. Unfortunately,\nthis location is most likely not included in your user's PATH variable. So for\nexample if you did ``pip3 install --user hatch`` and then tried to learn more\nabout your new tool by doing ``hatch --help``, it would fail to be located.\nSee: `\u003chttps://github.com/pypa/pip/issues/3813\u003e`_\n\npybin solves this problem by providing a small CLI, and corresponding API, to\nlocate your Python's user bin and optionally update the user PATH. It supports\nall major operating systems and does not require elevated privileges!\n\n    **Fear not, this only modifies the user PATH; the system PATH is never\n    touched nor even looked at!**\n\n.. contents:: ``Table of Contents``\n    :backlinks: none\n\nInstallation\n------------\n\npybin is distributed on `PyPI \u003chttps://pypi.org\u003e`_ as a universal\nwheel and is available on Linux/macOS and Windows and supports\nPython 2.6-2.7/3.3+ and PyPy.\n\n.. code-block:: bash\n\n    $ pip install pybin\n\nYou may need ``sudo``. Do **NOT** use ``--user``!\n\nCommands\n--------\n\nOnly 2!\n\npybin\n^^^^^\n\n.. code-block:: bash\n\n    $ pybin -h\n    Usage: pybin [OPTIONS] COMMAND [ARGS]...\n\n      Shows the location of the bin directory and whether or not it is in the\n      user PATH.\n\n    Options:\n      -p, --pypath TEXT  An absolute path to a Python executable.\n      --version          Show the version and exit.\n      -h, --help         Show this message and exit.\n\n    Commands:\n      put  Updates the user PATH\n\npybin put\n^^^^^^^^^\n\n.. code-block:: bash\n\n    $ pybin put -h\n    Usage: pybin put [OPTIONS]\n\n      Updates the user PATH. The shell must be restarted for the update to take\n      effect.\n\n    Options:\n      -p, --pypath TEXT  An absolute path to a Python executable.\n      -f, --force        Update PATH even if it appears to be correct.\n      -h, --help         Show this message and exit.\n\nAPI\n---\n\n.. code-block:: python\n\n    \u003e\u003e\u003e from pybin import in_path, locate, put_in_path\n    \u003e\u003e\u003e in_path()\n    False\n    \u003e\u003e\u003e locate()\n    'C:\\\\Users\\\\Ofek\\\\AppData\\\\Roaming\\\\Python\\\\Python36\\\\Scripts'\n    \u003e\u003e\u003e success = put_in_path()\n\nManual modification\n-------------------\n\nUse the location pybin shows in concert with this very comprehensive document\nJava provides: `\u003chttps://www.java.com/en/download/help/path.xml\u003e`_\n\nLicense\n-------\n\npybin is distributed under the terms of both\n\n- `MIT License \u003chttps://choosealicense.com/licenses/mit\u003e`_\n- `Apache License, Version 2.0 \u003chttps://choosealicense.com/licenses/apache-2.0\u003e`_\n\nat your option.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofek%2Fpybin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fofek%2Fpybin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fofek%2Fpybin/lists"}