{"id":13399236,"url":"https://github.com/qw3rtman/p","last_synced_at":"2025-04-04T08:08:27.311Z","repository":{"id":31515464,"uuid":"35079848","full_name":"qw3rtman/p","owner":"qw3rtman","description":":snake: Python Version Management Made Simple","archived":false,"fork":false,"pushed_at":"2019-11-01T07:04:46.000Z","size":38,"stargazers_count":782,"open_issues_count":20,"forks_count":45,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-28T07:08:26.289Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/qw3rtman.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}},"created_at":"2015-05-05T05:29:39.000Z","updated_at":"2025-03-21T05:13:42.000Z","dependencies_parsed_at":"2022-07-28T23:39:11.635Z","dependency_job_id":null,"html_url":"https://github.com/qw3rtman/p","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qw3rtman%2Fp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qw3rtman%2Fp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qw3rtman%2Fp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qw3rtman%2Fp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qw3rtman","download_url":"https://codeload.github.com/qw3rtman/p/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247142066,"owners_count":20890652,"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":[],"created_at":"2024-07-30T19:00:35.549Z","updated_at":"2025-04-04T08:08:27.294Z","avatar_url":"https://github.com/qw3rtman.png","language":"Shell","readme":"# `p`\n## Python Version Management, Simplified.\n\n![introduction](https://cloud.githubusercontent.com/assets/1139621/7488032/37f37308-f389-11e4-8995-89f7cba5ad8b.gif)\n\n`p` is **powerful** and **feature-packed**, yet **simple**; both in setup and use. There are no tricky settings, options, or crazy dependencies. `p` is just a helpful ~600 line Bash script that gets the job done.\n\n**`p` let's you quickly switch between Python versions whenever you need to, removing the barrier between Python 2.x.x and 3.x.x.**\n\n`p` was heavily inspired by [`n`, a version manager for Node.js](https://github.com/tj/n).\n\n`p` is also great for getting started using Python development versions. Use `p latest` to get up and running with the latest development version of Python!\n\n## Getting Started\nAfter the [super painless drag-and-drop installation](#installation), you can [start using `p`](#usage) right away.\n\n## Usage\n```\nUsage: p [COMMAND] [args]\n\nCommands:\n\np                              Output versions installed\np status                       Output current status\np \u003cversion\u003e                    Activate to Python \u003cversion\u003e\n\tp latest                     Activate to the latest Python release\n\tp stable                     Activate to the latest stable Python release\np use \u003cversion\u003e [args ...]     Execute Python \u003cversion\u003e with [args ...]\np bin \u003cversion\u003e                Output bin path for \u003cversion\u003e\np rm \u003cversion ...\u003e             Remove the given version(s)\np prev                         Revert to the previously activated version\np ls                           Output the versions of Python available\n\tp ls latest                  Output the latest Python version available\n\tp ls stable                  Output the latest stable Python version available\n\nOptions:\n\n-V, --version   Output current version of p\n-h, --help      Display help information\n```\n\n## Installation\nAfter downloading the Bash script, simply copy it over to your `$PATH` and `p` will take care of the rest.\n```sh\n$ wget https://github.com/qw3rtman/p/releases/download/v0.1.0/p\n$ chmod +x p\n$ mv p /usr/local/bin\n```\n\nIf you don't have `wget` on your system, you can download the `p` binary from the [releases page](https://github.com/qw3rtman/p/releases) and follow the above steps from the second one onward.\n\nAlternatively, you can install `p` via `npm`:\n\n```shell\nnpm install -g pyvm\n```\n\nSo far, `p` has only been tested in Bash. If you can make `p` work on another shell, please send in a pull request!\n\n## Updating\nSimply follow the above steps and swap out the old Bash script with the new one!\n\n## Contributing\nContributions are always welcome.\n\nFind something interesting in the TODO below, fork our code, create a new branch, and send us a pull request.\n\nThere are only two rules: avoid [code smells](http://blog.codinghorror.com/code-smells/) and abide by the syntax-formatting of the existing code.\n\n## TODO\n* **greater abstraction between Python 2.x.x and 3.x.x**\n* also manage pip\n* per-directory/project Python version\n* **also manage PyPy**\n\n## FAQs\n* How does `p` differ from [`pyenv`](https://github.com/yyuu/pyenv)?\n  * `p` is designed for the average Python user. You can get up and running with the latest development build of Python with one simple command: `p latest`. No configuration is necessary; `p` manages everything for you.\n  * On the other hand, `pyenv` is for the more advanced user who is comfortable configuring their Python environment to all their needs. `p` provides the basics in one easy to use aesthetically-pleasing command.\n  * Additionally, `p` is easier to use. To switch your Python version, simply run `p` and you'll be presented with a list of installed Python versions to select from that you can scroll through with your arrow keys and select with the return key.\n  * `p` is great at dealing with any version of Python. If it's not installed, running `p \u003cversion\u003e` will download the source, configure it for your system, and compile it, all in one simple command.\n* How does `p` work?\n  * `p` stores each Python version installed in `/usr/local/p/versions/python`. When a Python version is activated, `p` creates a symbolic link to the Python binary located at `/usr/local/p/versions/python/python`. Since `p` prefixes the $PATH with `/usr/local/p/versions/python`, this version of `python` is found first; hence, it is used over the default version of Python installed on your system.\n* How do I revert back to my default Python version?\n  * Simply run `p default` and `p` will remove the symbolic link described above; therefore reverting back to your default Python version.\n* Does `p` download the source each time I activate or install a version?\n  * Nope. `p` stores the source for each of the versions installed, allowing for quick activations between already-installed versions.\n* How do I get this working on Windows?\n  * Unfortunately, `p` is not supported on Windows at the time. If you know of a workaround, send in a pull request!\n\n## Core Team\n### Nimit Kalra\n* \u003cme@nimit.io\u003e / \u003cnimit@utexas.edu\u003e\n* \u003chttp://nimit.io\u003e\n* \u003chttps://github.com/qw3rtman\u003e\n* \u003chttps://twitter.com/nimkalra\u003e\n\n## License\n\nThe below license was included in [`n`](https://github.com/tj/n) and is included below. `p`'s license (also MIT) can be found in [the LICENSE file](https://github.com/qw3rtman/p/blob/master/LICENSE).\n\n\u003e (The MIT License)\n\n\u003e Copyright (c) 2014 TJ Holowaychuk \u0026lt;tj@vision-media.ca\u0026gt;\n\n\u003e Permission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\n\u003e The above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\n\u003e THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":["Environment Management","资源列表","Shell","Awesome Python"],"sub_categories":["环境管理","Environment Management"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqw3rtman%2Fp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqw3rtman%2Fp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqw3rtman%2Fp/lists"}