pybin
When you install a package via pip install --user ..., any executables get placed in a special directory specifically for the intended user. Unfortunately, this location is most likely not included in your user’s PATH variable. So for example if you did pip3 install --user hatch and then tried to learn more about your new tool by doing hatch --help, it would fail to be located. See: https://github.com/pypa/pip/issues/3813
pybin solves this problem by providing a small CLI, and corresponding API, to locate your Python’s user bin and optionally update the user PATH. It supports all major operating systems and does not require elevated privileges!
Fear not, this only modifies the user PATH; the system PATH is never touched nor even looked at!
Installation
pybin is distributed on PyPI as a universal wheel and is available on Linux/macOS and Windows and supports Python 2.6-2.7/3.3+ and PyPy.
$ pip install pybin
Do not use --user!
Commands
Only 2!
pybin
$ pybin -h
Usage: pybin [OPTIONS] COMMAND [ARGS]...
Shows the location of the bin directory and whether or not it is in the
user PATH.
Options:
-p, --pypath TEXT An absolute path to a Python executable.
--version Show the version and exit.
-h, --help Show this message and exit.
Commands:
put Updates the user PATH
pybin put
$ pybin put -h
Usage: pybin put [OPTIONS]
Updates the user PATH. The shell must be restarted for the update to take
effect.
Options:
-p, --pypath TEXT An absolute path to a Python executable.
-f, --force Update PATH even if it appears to be correct.
-h, --help Show this message and exit.
API
>>> from pybin import in_path, locate, put_in_path
>>> in_path()
False
>>> locate()
'C:\\Users\\Ofek\\AppData\\Roaming\\Python\\Python36\\Scripts'
>>> success = put_in_path()
Manual modification
Use the location pybin shows in concert with this very comprehensive document Java provides: https://www.java.com/en/download/help/path.xml
License
pybin is distributed under the terms of both
at your option.
Metadata
Release files for pybin 0.3.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pybin-0.3.4.tar.gz | 9.0 kB | Without provenance | Details for pybin-0.3.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pybin-0.3.4-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for pybin-0.3.4-py2.py3-none-any.whl |
Total release size: 16.9 kB
Release files / pybin-0.3.4.tar.gz
| Download URL | pybin-0.3.4.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
36c82a50dd16f7a912afdc094f5e0b1df7a53d16f35d653b7dc189d6b9b93018
|
|
BLAKE2b-256 checksum How to use checksums |
c3e299f2071761d63d919acd9cc4e0d70a2267b6207c10d330ac0764cd84224a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pybin-0.3.4-py2.py3-none-any.whl
| Download URL | pybin-0.3.4-py2.py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
983dae50c9a1717b54de57abc4c4084d60c61fb1e45b5834654b5d941fa76f68
|
|
BLAKE2b-256 checksum How to use checksums |
7e412b844055dcc1e5f2a9d0554e64b0a85a7e498d0c4814e58bd2f58a0db1aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pybin 0.3.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.