A Python library for managing user-installed package lists.
Project description
UserEnv: User Installed Modules Manager
Do you work on a system where python environments are pre-configured, and your only way to add custom modules is using pip install --user ? UserEnv allows you to keep multiple sets of user packages in a single python environment, as user environments.
A Concrete Example
Let's say you need to use both NumPy-1 and NumPy-2 in the same environment. First, create a userenv for NumPy-1:
$ userenv create numpy1 && userenv activate numpy1
User environment 'numpy1' created at /home/adorni/.userenv/envs/numpy1.
User environment 'numpy1' activated.
$ pip install --user numpy==1.26.4
...
Successfully installed numpy-1.26.4
Then, create a userenv for NumPy 2:
$ userenv create numpy2 && userenv activate numpy2
User environment 'numpy2' created at /home/adorni/.userenv/envs/numpy2.
User environment 'numpy2' activated.
$ pip install --user numpy==2.4.4
...
Successfully installed numpy-2.4.4
Et voilà ! You can now use both versions of numpy the same way you would use a normal venv:
$ userenv activate numpy1 && python -c "import numpy; print(numpy.__version__)"
User environment 'numpy1' activated.
1.26.4
$ userenv activate numpy2 && python -c "import numpy; print(numpy.__version__)"
User environment 'numpy2' activated.
2.4.4
Installation
$ pip install --user pyuserenv
$ userenv setup
Make sure to follow the setup instructions with the modifications to your shell configuration file (e.g., .bashrc, .zshrc), then reload your config
source ~/.bashrc # example for .bashrc
You're good to go !
$ userenv --help
Usage: userenv [OPTIONS] COMMAND [ARGS]...
╭─ Options ─────────────────────────────────────────────────────────╮
│ --version -v Show the version of pyuserenv │
│ --help Show this message and exit. │
╰───────────────────────────────────────────────────────────────────╯
╭─ Commands ────────────────────────────────────────────────────────╮
│ list List all user environments with their installed │
│ module count and last installed module datetime. │
│ create Create a new user environment. │
│ activate Activate a user environment. │
│ active Display the currently active user environment. │
│ deactivate Deactivate the currently active user environment. │
│ setup Setup the user environment directory structure. │
│ delete Delete an existing user environment. │
╰───────────────────────────────────────────────────────────────────╯
Contributing
Feel free to submit pull requests and file bugs in the issue tracker.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyuserenv-1.1.3.tar.gz.
File metadata
- Download URL: pyuserenv-1.1.3.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d496b1a6ea96e8348cae8af8a4b30c5acbf2f8aa4f434816cba5086f4a714b3
|
|
| MD5 |
a386eb6aff95ed7c874c2acd2d35f60a
|
|
| BLAKE2b-256 |
2229521bf5530df4beeac984d479adc40b659865d248eb206679eef539eaca35
|
Provenance
The following attestation bundles were made for pyuserenv-1.1.3.tar.gz:
Publisher:
python-publish.yml on pierreadorni/userenv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyuserenv-1.1.3.tar.gz -
Subject digest:
2d496b1a6ea96e8348cae8af8a4b30c5acbf2f8aa4f434816cba5086f4a714b3 - Sigstore transparency entry: 1582913680
- Sigstore integration time:
-
Permalink:
pierreadorni/userenv@331eb033bdd0367d8e83c56df779d11b04f5f974 -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/pierreadorni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@331eb033bdd0367d8e83c56df779d11b04f5f974 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pyuserenv-1.1.3-py3-none-any.whl.
File metadata
- Download URL: pyuserenv-1.1.3-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3ea06dea5e624eb407be86a8a9b14f24e2c0421f654d9ab0eb58ad437b515c3
|
|
| MD5 |
f37470a69a9f29c1f105bebf843484dc
|
|
| BLAKE2b-256 |
227e887fab1414f8de4b4a7e62372713f54352d8f180cdfcf99763f79a11f60b
|
Provenance
The following attestation bundles were made for pyuserenv-1.1.3-py3-none-any.whl:
Publisher:
python-publish.yml on pierreadorni/userenv
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyuserenv-1.1.3-py3-none-any.whl -
Subject digest:
e3ea06dea5e624eb407be86a8a9b14f24e2c0421f654d9ab0eb58ad437b515c3 - Sigstore transparency entry: 1582913805
- Sigstore integration time:
-
Permalink:
pierreadorni/userenv@331eb033bdd0367d8e83c56df779d11b04f5f974 -
Branch / Tag:
refs/tags/v1.1.3 - Owner: https://github.com/pierreadorni
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@331eb033bdd0367d8e83c56df779d11b04f5f974 -
Trigger Event:
release
-
Statement type: