Install and Run Python Applications in Isolated Environments

Overview

pipx β€” Install and Run Python Applications in Isolated Environments

Test CI PyPI version

Documentation: https://pipxproject.github.io/pipx/

Source Code: https://github.com/pipxproject/pipx

For comparison to other tools including pipsi, see Comparison to Other Tools.

Install pipx

On macOS:

brew install pipx
pipx ensurepath

Upgrade pipx with brew update && brew upgrade pipx.

Otherwise, install via pip:

python3 -m pip install --user pipx
python3 -m pipx ensurepath

Upgrade pipx with python3 -m pip install --user -U pipx.

Shell completions are available by following the instructions printed with this command:

pipx completions

For more details, see the installation instructions.

Overview: What is pipx?

pipx is a tool to help you install and run end-user applications written in Python. It's roughly similar to macOS's brew, JavaScript's npx, and Linux's apt.

It's closely related to pip. In fact, it uses pip, but is focused on installing and managing Python packages that can be run from the command line directly as applications.

How is it Different from pip?

pip is a general-purpose package installer for both libraries and apps with no environment isolation. pipx is made specifically for application installation, as it adds isolation yet still makes the apps available in your shell: pipx creates an isolated environment for each application and its associated packages.

pipx does not ship with pip, but installing it is often an important part of bootstrapping your system.

Where Does pipx Install Apps From?

By default, pipx uses the same package index as pip, PyPI. pipx can also install from all other sources pip can, such as a local directory, wheel, git url, etc.

Python and PyPI allow developers to distribute code with "console script entry points". These entry points let users call into Python code from the command line, effectively acting like standalone applications.

pipx is a tool to install and run any of these thousands of application-containing packages in a safe, convenient, and reliable way. In a way, it turns Python Package Index (PyPI) into a big app store for Python applications. Not all Python packages have entry points, but many do.

If you would like to make your package compatible with pipx, all you need to do is add a console scripts entry point. If you're a poetry user, use these instructions.

Features

pipx enables you to

  • Expose CLI entrypoints of packages ("apps") installed to isolated environments with the install command. This guarantees no dependency conflicts and clean uninstalls!
  • Easily list, upgrade, and uninstall packages that were installed with pipx
  • Run the latest version of a Python application in a temporary environment with the run command

Best of all, pipx runs with regular user permissions, never calling sudo pip install (you aren't doing that, are you? πŸ˜„ ).

Walkthrough: Installing a Package and its Applications With pipx

You can globally install an application by running

pipx install PACKAGE

This automatically creates a virtual environment, installs the package, and adds the package's associated applications (entry points) to a location on your PATH. For example, pipx install pycowsay makes the pycowsay command available globally, but sandboxes the pycowsay package in its own virtual environment. pipx never needs to run as sudo to do this.

Example:

>> pipx install pycowsay
  installed package pycowsay 2.0.3, Python 3.7.3
  These apps are now globally available
    - pycowsay
done! ✨ 🌟 ✨


>> pipx list
venvs are in /home/user/.local/pipx/venvs
apps are exposed on your $PATH at /home/user/.local/bin
   package pycowsay 2.0.3, Python 3.7.3
    - pycowsay


# Now you can run pycowsay from anywhere
>> pycowsay mooo
  ____
< mooo >
  ====
         \
          \
            ^__^
            (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Installing from Source Control

You can also install from a git repository. Here, black is used as an example.

pipx install git+https://github.com/psf/black.git
pipx install git+https://github.com/psf/[email protected]  # branch of your choice
pipx install git+https://github.com/psf/[email protected]  # git hash
pipx install https://github.com/psf/black/archive/18.9b0.zip  # install a release

Walkthrough: Running an Application in a Temporary Virtual Environment

This is an alternative to pipx install.

pipx run downloads and runs the above mentioned Python "apps" in a one-time, temporary environment, leaving your system untouched afterwards.

This can be handy when you need to run the latest version of an app, but don't necessarily want it installed on your computer.

You may want to do this when you are initializing a new project and want to set up the right directory structure, when you want to view the help text of an application, or if you simply want to run an app in a one-off case and leave your system untouched afterwards.

For example, the blog post How to set up a perfect Python project uses pipx run to kickstart a new project with cookiecutter, a tool that creates projects from project templates.

A nice side benefit is that you don't have to remember to upgrade the app since pipx run will automatically run a recent version for you.

Okay, let's see what this looks like in practice!

pipx run APP [ARGS...]

This will install the package in an isolated, temporary directory and invoke the app. Give it a try:

> pipx run pycowsay moo

  ---
< moo >
  ---
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||


Notice that you don't need to execute any install commands to run the app.

Any arguments after the application name will be passed directly to the application:

> pipx run pycowsay these arguments are all passed to pycowsay!

  -------------------------------------------
< these arguments are all passed to pycowsay! >
  -------------------------------------------
   \   ^__^
    \  (oo)\_______
       (__)\       )\/\
           ||----w |
           ||     ||

Re-running the same app is quick because pipx caches Virtual Environments on a per-app basis. The caches only last a few days, and when they expire, pipx will again use the latest version of the package. This way you can be sure you're always running a new version of the package without having to manually upgrade.

If the app name does not match that package name, you can use the --spec argument:

pipx run --spec PACKAGE APP

You can also use the --spec argument to run a specific version, or use any other pip-specifier:

pipx run --spec PACKAGE==1.0.0 APP

Running from Source Control

You can also run from a git repository. Here, black is used as an example.

pipx run --spec git+https://github.com/psf/black.git black
pipx run --spec git+https://github.com/psf/[email protected] black  # branch of your choice
pipx run --spec git+https://github.com/psf/[email protected] black  # git hash
pipx run --spec https://github.com/psf/black/archive/18.9b0.zip black # install a release

Running from URL

You can run .py files directly, too.

pipx run https://gist.githubusercontent.com/cs01/fa721a17a326e551ede048c5088f9e0f/raw/6bdfbb6e9c1132b1c38fdd2f195d4a24c540c324/pipx-demo.py
pipx is working!

Summary

That's it! Those are the most important commands pipx offers. To see all of pipx's documentation, run pipx --help or see the docs.

Testimonials

"Thanks for improving the workflow that pipsi has covered in the past. Nicely done!"
β€”Jannis Leidel, PSF fellow, former pip and Django core developer, and founder of the Python Packaging Authority (PyPA)

"My setup pieces together pyenv, poetry, and pipx. [...] For the things I need, it’s perfect."
β€”Jacob Kaplan-Moss, co-creator of Django in blog post My Python Development Environment, 2020 Edition

"I'm a big fan of pipx. I think pipx is super cool."
β€”Michael Kennedy, co-host of PythonBytes podcast in episode 139

Credits

pipx was inspired by pipsi and npx. It was created by Chad Smith and has had lots of help from contributors. The logo was created by @IrishMorales.

pipx is maintained by a team of volunteers (in alphabetical order)

Contributing

Issues and Pull Requests are definitely welcome! Check out Contributing to get started.

Comments
  • Implementation of stored pipx metadata

    Implementation of stored pipx metadata

    This is in reference to Issue #220

    I've implemented a pipxrc file in each venv directory that contains the following:

    • package_or_url - keeping track of the origin of the venv package
    • venv_metadata - keeping track of venv package metadata so uninstall is possible even if the python pointer in the venv bin/ directory is no longer valid
    • injected_packages - keeping track of all injected packages, allowing reinstall to re-inject them all

    I realize that I don't have this in a proper named branch, and the commit log is a bit messy and winding (I spent time figuring out the best way to implement things.) I'm happy to fix all of the above, but I thought it best to submit the code I have to allow for discussion.

    Having a pipxrc really helps a lot! I modified install, uninstall, upgrade, reinstall-all, upgrade-all: all of these commands behave much better, especially with URL-based packages. In this code I also modified reinstall-all to re-inject all injected packages, which fixes Issue #63.

    I also tested reinstall-all with broken symlinks to python inside of the venv, and it works beautifully. This would allow this pull request to fix Issue #146 by allowing reinstall-all to update all the venvs after a system python upgrade. Note: I would recommend that reinstall-all use DEFAULT_PYTHON as the default for the python argument instead of requiring that argument.

    Some outstanding issues:

    • I uncovered a bug by looking at the code (#221). I believe pipxrc can help with this, because it remembers both the injected packages and their inject flags. But I have not addressed this Issue with this pull request
    • I believe that upgrade can drop the '--spec' option now that each venv remembers its own package_or_url, but I didn't code this.
    • I did not handle an exception if pipx is unable to write pipxrc. I was unsure if this was necessary
    • I am not sure exactly whether _run_post_install_actions() affects the venv metadata. If it does, then pipxrc venv_metadata should be updated afterwards. (This is not done in my current pull request)
    opened by itsayellow 64
  • Installing local package fails

    Installing local package fails

    Describe the bug

    pipx fails to install a local package.

    How to reproduce

    pipx install .
    Cannot determine package name from spec '.'. Check package spec for errors.
    
    pipx --version
    0.15.1.3
    

    Expected behavior

    The package should be installed.

    opened by rokroskar 37
  • run app appargs fix for -- double-dash

    run app appargs fix for -- double-dash

    Fixes #267

    This PR allows all arguments after pip run <app_name> to be sent verbatim to the <app_name> app. Currently a -- argument is possible to be removed by argparse before sending the list of arguments to the app.

    The code included in a new parse_args() function doubles a -- argument if it will be removed by argparse. argparse will only remove the first -- in a line, so this ensures that the appargs specified by the user will all be sent to the app.

    opened by itsayellow 35
  • All virtualenvs break when Python version is upgraded

    All virtualenvs break when Python version is upgraded

    I ran

    $ pipx install poetry
    

    just yesterday, and everything worked fine. Then I ran

    $ brew upgrade
    

    which upgraded my system Python from 3.7.2 to 3.7.3. Now pipx no longer works:

    % poetry --version
    zsh: /Users/raxod502/.local/bin/poetry: bad interpreter: /Users/raxod502/.local/pipx/venvs/poetry/bin/python: no such file or directory
    
    % pipx run poetry --version
    ⚠️  poetry is already on your PATH and installed at /Users/raxod502/.local/bin/poetry. Downloading and running anyway.
    Traceback (most recent call last):
      File "/Users/raxod502/.local/bin/pipx", line 10, in <module>
        sys.exit(cli())
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 525, in cli
        exit(run_pipx_command(parsed_pipx_args, binary_args))
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 141, in run_pipx_command
        use_cache,
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 101, in run
        retval = venv.run_binary(binary, binary_args)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/Venv.py", line 106, in run_binary
        return _run(cmd, check=False)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/Venv.py", line 127, in _run
        returncode = subprocess.run(cmd_str_list).returncode
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/Users/raxod502/.local/pipx/.cache/d7fe01e92227b36/bin/poetry': '/Users/raxod502/.local/pipx/.cache/d7fe01e92227b36/bin/poetry'
    
    % pipx upgrade poetry
    Traceback (most recent call last):
      File "/Users/raxod502/.local/bin/pipx", line 10, in <module>
        sys.exit(cli())
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 525, in cli
        exit(run_pipx_command(parsed_pipx_args, binary_args))
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 184, in run_pipx_command
        include_deps=args.include_deps,
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 213, in upgrade
        old_version = venv.get_venv_metadata_for_package(package).package_version
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/Venv.py", line 74, in get_venv_metadata_for_package
        stdout=subprocess.PIPE,
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/Users/raxod502/.local/pipx/venvs/poetry/bin/python': '/Users/raxod502/.local/pipx/venvs/poetry/bin/python'
    
    % pipx list
    venvs are in /Users/raxod502/.local/pipx/venvs
    binaries are exposed on your $PATH at /Users/raxod502/.local/bin
    multiprocessing.pool.RemoteTraceback:
    """
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 121, in worker
        result = (True, func(*args, **kwds))
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
        return list(map(*args))
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 538, in _get_package_summary
        metadata = venv.get_venv_metadata_for_package(package)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/Venv.py", line 74, in get_venv_metadata_for_package
        stdout=subprocess.PIPE,
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/Users/raxod502/.local/pipx/venvs/poetry/bin/python': '/Users/raxod502/.local/pipx/venvs/poetry/bin/python'
    """
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/Users/raxod502/.local/bin/pipx", line 10, in <module>
        sys.exit(cli())
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 525, in cli
        exit(run_pipx_command(parsed_pipx_args, binary_args))
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 187, in run_pipx_command
        commands.list_packages(PIPX_LOCAL_VENVS)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 599, in list_packages
        for package_summary in p.map(_get_package_summary, dirs):
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 268, in map
        return self._map_async(func, iterable, mapstar, chunksize).get()
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/multiprocessing/pool.py", line 657, in get
        raise self._value
    FileNotFoundError: [Errno 2] No such file or directory: '/Users/raxod502/.local/pipx/venvs/poetry/bin/python': '/Users/raxod502/.local/pipx/venvs/poetry/bin/python'
    
    % pipx install poetry
    'poetry' already seems to be installed. Not modifying existing installation in '/Users/raxod502/.local/pipx/venvs/poetry'. Pass '--force' to force installation
    
    % pipx install poetry --force
    Installing to existing directory '/Users/raxod502/.local/pipx/venvs/poetry'
    Error: [Errno 2] No such file or directory: '/Users/raxod502/.local/pipx/venvs/poetry/bin/python3.7': '/Users/raxod502/.local/pipx/venvs/poetry/bin/python3.7'
    '/usr/local/opt/python/bin/python3.7 -m venv /Users/raxod502/.local/pipx/venvs/poetry' failed
    
    % pipx reinstall-all python3
    Traceback (most recent call last):
      File "/Users/raxod502/.local/bin/pipx", line 10, in <module>
        sys.exit(cli())
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 516, in cli
        exit(run_pipx_command(parsed_pipx_args, binary_args))
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 209, in run_pipx_command
        skip=args.skip,
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 467, in reinstall_all
        uninstall(venv_dir, package, local_bin_dir, verbose)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 426, in uninstall
        metadata = venv.get_venv_metadata_for_package(package)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/Venv.py", line 85, in get_venv_metadata_for_package
        stdout=subprocess.PIPE,
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/Users/raxod502/.local/pipx/venvs/poetry/bin/python': '/Users/raxod502/.local/pipx/venvs/poetry/bin/python'
    
    % pipx uninstall-all
    Traceback (most recent call last):
      File "/Users/raxod502/.local/bin/pipx", line 10, in <module>
        sys.exit(cli())
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 516, in cli
        exit(run_pipx_command(parsed_pipx_args, binary_args))
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/main.py", line 191, in run_pipx_command
        commands.uninstall_all(PIPX_LOCAL_VENVS, LOCAL_BIN_DIR, verbose)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 449, in uninstall_all
        uninstall(venv_dir, package, local_bin_dir, verbose)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/commands.py", line 426, in uninstall
        metadata = venv.get_venv_metadata_for_package(package)
      File "/Users/raxod502/.local/lib/python/site-packages/pipx/Venv.py", line 85, in get_venv_metadata_for_package
        stdout=subprocess.PIPE,
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 472, in run
        with Popen(*popenargs, **kwargs) as process:
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 775, in __init__
        restore_signals, start_new_session)
      File "/usr/local/Cellar/python/3.7.3/Frameworks/Python.framework/Versions/3.7/lib/python3.7/subprocess.py", line 1522, in _execute_child
        raise child_exception_type(errno_num, err_msg, err_filename)
    FileNotFoundError: [Errno 2] No such file or directory: '/Users/raxod502/.local/pipx/venvs/poetry/bin/python': '/Users/raxod502/.local/pipx/venvs/poetry/bin/python'
    

    I assume the problem is that when pipx creates the virtual environments, it resolves /usr/local/bin/python3 as a symbolic link, which is problematic since the destination of that symlink changes every time Homebrew upgrades Python (thus making the old virtualenv's Python executable no longer work). I have experienced this problem with Pip as well, but presumably pipx could wrap this behavior somehow to make it work, or at least display a useful error message. At the least, it would be nice to have pipx reinstall-all python3 work properly.

    Workaround is something like the following:

    % mv ~/.local/pipx /tmp/pipx
    % ls /tmp/pipx/venvs | xargs -L 1 pipx install
    

    and manually prune any broken symlinks from ~/.local/bin.

    opened by raxod502 35
  • ModuleNotFoundError: No module named 'pip._vendor.six' when running

    ModuleNotFoundError: No module named 'pip._vendor.six' when running "pipx install"

    Describe the bug

    I have installed a new Debian (unstable) system. On one of my installations pipx runs without problems. The newly installed system behaves differently and I do not know where to look.

    How to reproduce

    $ pipx install --verbose youtube-dl
    pipx > (_package_name_from_spec:93): Determined package name: youtube-dl
    pipx > (_package_name_from_spec:94): Package name determined in 0.0s
    pipx > (run_subprocess:112): running /usr/bin/python3 -m venv --without-pip /home/kai/.local/pipx/venvs/youtube-dl
    pipx > (run_subprocess:112): running /home/kai/.local/pipx/venvs/youtube-dl/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
    pipx > (run_subprocess:112): running /home/kai/.local/pipx/shared/bin/python -c import sysconfig; print(sysconfig.get_path('purelib'))
    pipx > (run_subprocess:112): running /home/kai/.local/pipx/venvs/youtube-dl/bin/python --version
    pipx > (run_subprocess:112): running /home/kai/.local/pipx/venvs/youtube-dl/bin/python -m pip install youtube-dl
    Traceback (most recent call last):
      File "/usr/lib/python3.8/runpy.py", line 193, in _run_module_as_main
        return _run_code(code, main_globals, None,
      File "/usr/lib/python3.8/runpy.py", line 86, in _run_code
        exec(code, run_globals)
      File "/home/kai/.local/pipx/shared/lib/python3.8/site-packages/pip/__main__.py", line 16, in <module>
        from pip._internal.cli.main import main as _main  # isort:skip # noqa
      File "/home/kai/.local/pipx/shared/lib/python3.8/site-packages/pip/_internal/cli/main.py", line 10, in <module>
        from pip._internal.cli.autocompletion import autocomplete
      File "/home/kai/.local/pipx/shared/lib/python3.8/site-packages/pip/_internal/cli/autocompletion.py", line 9, in <module>
        from pip._internal.cli.main_parser import create_main_parser
      File "/home/kai/.local/pipx/shared/lib/python3.8/site-packages/pip/_internal/cli/main_parser.py", line 7, in <module>
        from pip._internal.cli import cmdoptions
      File "/home/kai/.local/pipx/shared/lib/python3.8/site-packages/pip/_internal/cli/cmdoptions.py", line 24, in <module>
        from pip._internal.exceptions import CommandError
      File "/home/kai/.local/pipx/shared/lib/python3.8/site-packages/pip/_internal/exceptions.py", line 10, in <module>
        from pip._vendor.six import iteritems
    ModuleNotFoundError: No module named 'pip._vendor.six'
    pipx > (install_package:189): '/home/kai/.local/pipx/venvs/youtube-dl/bin/python -m pip install youtube-dl' failed
    
    pipx > (rmdir:18): removing directory /home/kai/.local/pipx/venvs/youtube-dl
    Error installing youtube-dl.
    

    If I run python3 from the command line I can import the module:

    $ python3 -c "import pip._vendor.six"
    $
    

    I have no idea what could be different. I already checked the list of python3-* packages on both systems but that seems to be the same. Any idea what to look for or how to debug the issue?

    Expected behavior

    The package should be installed.

    enhancement 
    opened by kwbr 34
  • Add env var to set DEFAULT_PYTHON (add Pyenv support)

    Add env var to set DEFAULT_PYTHON (add Pyenv support)

    Fixes #113.

    This keeps sys.executable as the default, but will use the PIPX_DEFAULT_PYTHON environment variable, if defined. This mean no change in functionality for any users until they define the variable.

    I'm suggesting the var PIPX_DEFAULT_PYTHON (no PYENV even though the original issue asked for pyenv support), because this approach will work with any python manager, and I think it might be confusing to enshrine one manager in the var name over others.

    Also, it didn't look like the constants are tested, so I didn't update any tests. But let me know if I missed something and I'll be happy to add.

    opened by wren 32
  • Other `pipx list` output formats

    Other `pipx list` output formats

    How would this feature be useful?

    Hopefully this will synthesize (and possibly supersede) Issues #390 and #109. It addresses the reason for PRs #572 and #392.

    This Issue is to track exactly what users are looking for with different pipx list output formats.

    "Import / Export" set of pipx packages case

    In #109, it appears that one primary motivator is the ability to export a file that specifies a set of pipx-installable packages that pipx can then install (possibly on another machine) in the future.

    How many users desire this or would find it useful?

    It would probably best be done by making a file in json format.

    Within this there are some further points for those desiring this functionality:

    Do people consider it desired (or necessary?) to freeze all versions of all dependencies for this to be useful? If so then this might be very difficult, based on my investigation creating test code for this.

    Simply re-creating a pipx environment, and pinning the version of the main package and any injected packages, and any pipx options is very doable. I have a branch of doing this basically working. In this case, the output would be equivalent to what you would end up with on one machine executing pipx reinstall-all. You can be sure the main package and any injected packages will stay with their specified versions, but you cannot be sure that the versions of any dependencies that still satisfy all package requirements will be the same.

    Archive / Documentation case

    In #390 it appears that one motivation is simply a concise version of pipx list for "keeping track" or for archival or documentation purposes.

    How many users desire this or would find it useful?

    Is this type of list output (that is merely more concise) still desired if the "Import / Export" case is available?

    What are the goals of this format? What are the use cases specifically? How would one know if the output of this was "successful"?

    I must confess that I need this one explained to me, it doesn't naturally occur to me what is desired. If all that's needed is documentation of what is currently installed, then the current pipx list seems to cover that. If what is desired is a structured output that would allow one to recreate a pipx environment, then the "Import / Export" json scenario seems to satisfy the need.

    @comkieffer @gvoysey @sanketdg @zachvalenta

    Describe the solution you'd like

    Describe alternatives you've considered

    opened by itsayellow 28
  • Use importlib.metadata

    Use importlib.metadata

    Working on #339, I discovered this use of the deprecated pkg_resources module. This change adds a dependency on importlib_metadata for python 3.7 and earlier and uses the stdlib version on Python 3.8 and later.

    I haven't tested this behavior, so I could use some help validating that it does what's expected.

    opened by jaraco 28
  • pipx install erroneously exposing binaries of dependencies despite no `--include-deps` switch

    pipx install erroneously exposing binaries of dependencies despite no `--include-deps` switch

    This might already be possible, I couldn't find out how however.

    How would this feature be useful? Currently when installing a package all of it's included apps (dependencies?) are exposed to $PATH, even though when I for instance want to install organize using pipx install organize-tool I really only want the organize binary to be exposed. I assume (with my limited knowledge of python packages) that these apps are actually required for the main app but could also be contained to the venv and don't need to be exposed to $PATH.

    What is actually installed is the following:

       package organize-tool 1.9.1, Python 3.8.5
        - EXIF.py
        - activate-global-python-argcomplete
        - docx2txt
        - dumppdf.py
        - latin2ascii.py
        - organize
        - pdf2txt.py
        - python-argcomplete-check-easy-install-script
        - python-argcomplete-tcsh
        - register-python-argcomplete
        - textract
    

    I looked for a way to do this and thought I might be able to do so by editing the pipx_metadata.json but unfortunately that doesn't seem to be the case.

    Describe the solution you'd like Given that it's probably not practical to determine which of the apps included is the main one it'd probably be better to make this configurable by the user themselves in for instance the pipx_metadata.json

    opened by sandersantema 26
  • Windows support?

    Windows support?

    It's not clear from the docs if pipx supports Windows, but given that it relies on symlinks, I assume not? (Symlinks typically require extra privileges on Windows, that the average user doesn't have). Are there plans to support Windows?

    help wanted 
    opened by pfmoore 26
  • >= 0.15 has undeclared dependency on setuptools

    >= 0.15 has undeclared dependency on setuptools

    Describe the bug pkg_resources, which is part of setuptools, is used to parse the pipx version number and is also used extensively in the venv_metadata_inspector. setuptools should not be assumed to be available in the runtime environment unless explicitly required.

    How to reproduce Install pipx in a virtual environment without setuptools:

    $ python -m venv .venv
    $ source .venv/bin/activate.fish
    $ python -m pip uninstall setuptools
    Uninstalling setuptools-41.2.0:
      Would remove:
        .venv/bin/easy_install
        .venv/bin/easy_install-3.8
        .venv/lib/python3.8/site-packages/easy_install.py
        .venv/lib/python3.8/site-packages/pkg_resources/*
        .venv/lib/python3.8/site-packages/setuptools-41.2.0.dist-info/*
        .venv/lib/python3.8/site-packages/setuptools/*
    Proceed (y/n)? y
      Successfully uninstalled setuptools-41.2.0
    $ python -m pip list
    Package Version
    ------- -------
    pip     19.2.3
    WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    $ python -m pip install pipx
    Collecting pipx
      Downloading https://files.pythonhosted.org/packages/27/75/7a5762963703df84edc13c16ee6aaa3bcf559887a24c38d59d5e8a900ffa/pipx-0.15.1.2-py3-none-any.whl (43kB)
         |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 51kB 522kB/s
    Collecting argcomplete<2.0,>=1.9.4 (from pipx)
      Downloading https://files.pythonhosted.org/packages/82/7d/455e149c28c320044cb763c23af375bd77d52baca041f611f5c2b4865cf4/argcomplete-1.11.1-py2.py3-none-any.whl
    Collecting userpath (from pipx)
      Downloading https://files.pythonhosted.org/packages/8a/72/07927efb668a0aa0cef502dbe4da442ac9598f19344bca9a3eb9bd062ec1/userpath-1.3.0-py2.py3-none-any.whl
    Collecting click (from userpath->pipx)
      Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
    Installing collected packages: argcomplete, click, userpath, pipx
    Successfully installed argcomplete-1.11.1 click-7.0 pipx-0.15.1.2 userpath-1.3.0
    WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    $ pipx --version
    Traceback (most recent call last):
      File ".venv/bin/pipx", line 6, in <module>
        from pipx.main import cli
      File ".venv/lib/python3.8/site-packages/pipx/main.py", line 9, in <module>
        from pkg_resources import parse_version
    ModuleNotFoundError: No module named 'pkg_resources'
    

    Expected behavior As above.

    opened by layday 25
  • BUG: pipx upgrade doesn't understand extra dependencies

    BUG: pipx upgrade doesn't understand extra dependencies

    Describe the bug

    This works correctly

    pipx install "mycli[extras]"
    

    but this doesn't

    pipx install "mycli[extras]"
    pipx upgrade "mycli[extras]"
    

    and it fails with

    Package is not installed. Expected to find /path/to/pipx/venvs/mycli[isolated], but it does not exist.
    

    How to reproduce For reproduction, I suggest

    pipx install "coverage[toml]"
    pipx upgrade "coverage[toml]"
    

    Expected behavior I'm not 100% sure what should happen actually, but the current error message seems broken (of course a directory with [ and ] in its name wasn't found). I think the upgrade should go through wether or not the extra targets match the ones I used (or didn't use) the first time I installed the CLI (here coverage).

    I'd be happy to contribute a patch, but I'd appreciate some guidance regarding what the expected behaviour should be.

    enhancement 
    opened by neutrinoceros 4
  • Bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.4

    Bump pypa/gh-action-pypi-publish from 1.5.2 to 1.6.4

    Bumps pypa/gh-action-pypi-publish from 1.5.2 to 1.6.4.

    Release notes

    Sourced from pypa/gh-action-pypi-publish's releases.

    v1.6.4

    oh, boi! again?

    This is the last one tonight, promise! It fixes this embarrassing bug that was actually caught by the CI but got overlooked due to the lack of sleep. TL;DR GH passed $HOME from the external env into the container and that tricked the Python's site module to think that the home directory is elsewhere, adding non-existent paths to the env vars. See #115.

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.3...v1.6.4

    v1.6.3

    Another Release!? Why?

    In pypa/gh-action-pypi-publish#112, it was discovered that passing a $PATH variable even breaks the shebang. So this version adds more safeguards to make sure it keeps working with a fully broken $PATH.

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.2...v1.6.3

    v1.6.2

    What's Fixed

    • Made the $PATH and $PYTHONPATH environment variables resilient to broken values passed from the host runner environment, which previously allowed the users to accidentally break the container's internal runtime as reported in pypa/gh-action-pypi-publish#112

    Internal Maintenance Improvements

    New Contributors

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.1...v1.6.2

    v1.6.1

    What's happened?!

    There was a sneaky bug in v1.6.0 which caused Twine to be outside the import path in the Python runtime. It is fixed in v1.6.1 by updating $PYTHONPATH to point to a correct location of the user-global site-packages/ directory.

    Full Diff: https://github.com/pypa/gh-action-pypi-publish/compare/v1.6.0...v1.6.1

    v1.6.0

    Anything's changed?

    The only update is that the Python runtime has been upgraded from 3.9 to 3.11. There are no functional changes in this release.

    Full Changelog: https://github.com/pypa/gh-action-pypi-publish/compare/v1.5.2...v1.6.0

    Commits
    • c7f29f7 πŸ› Override $HOME in the container with /root
    • 644926c πŸ§ͺ Always run smoke testing in debug mode
    • e71a4a4 Add support for verbose bash execusion w/ $DEBUG
    • e56e821 πŸ› Make id always available in twine-upload
    • c879b84 πŸ› Use full path to bash in shebang
    • 57e7d53 πŸ›Ensure the default $PATH value is pre-loaded
    • ce291dc πŸŽ¨πŸ›Fix the branch @ pre-commit.ci badge links
    • 102d8ab πŸ› Rehardcode devpi port for GHA srv container
    • 3a9eaef πŸ›Use different ports in/out of GHA containers
    • a01fa74 πŸ› Use localhost @ GHA outside the containers
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • How to initialise an empty venv with no app?

    How to initialise an empty venv with no app?

    How would this feature be useful?

    I have a library package, and an app that uses the library package. Both are local-only, ie. I install them with pip install /path/to/library and pip install /path/to/app

    I want to install app with pipx, but if I run pipx install /path/to/app it fails because library is not available.

    I can't see how I can install library into the app venv before installing app.

    Describe the solution you'd like

    One possible workflow might be:

    • create an empty venv with a specified name
    • inject any dependencies into the venv
    • inject the app into the existing venv, using --include-apps to create symlink(s) for the app into $HOME/.local/bin

    In my use-case:

    • pipx init foo
    • pipx inject foo /path/to/library
    • pipx inject --include-apps foo /path/to/app

    So, what I need is the some command to create an empty venv into which I can inject dependencies and apps (the pipx init foo in the example above)

    Describe alternatives you've considered I have hacked a solution like this:

    • Install an arbitrary app to create a venv (I used cowsay)
    • Inject library into the cowsay venv
    • Inject app into the cowsay venv with --include-apps

    app is now available

    Suggestions for better ideas would be much appreciated.

    opened by robinbowes 3
  • Global installation of an application not recognizing pipx

    Global installation of an application not recognizing pipx

    Describe the bug The instructions to install an application globally from https://pypa.github.io/pipx/installation/ does not recognize pipx

    How to reproduce Here are the steps I took:

    python3 -m pip install --user pipx
    python3 -m pipx ensurepath
    sudo PIPX_HOME=/opt/pipx PIPX_BIN_DIR=/usr/local/bin pipx install cowsay
    

    Where the last command returns the error sudo: pipx: command not found

    I am running on Rocky Linux 8

    opened by ddeepwell 1
  • Allow running scripts with dependencies using pipx

    Allow running scripts with dependencies using pipx

    Fixes #913

    TODO

    • [x] I have added an entry to docs/changelog.md
    • [x] Documentation updates
    • [x] Additional tests for successfully running scripts with dependencies
    • [x] Refactor our use of the Venv class to handle app-less venvs properly
    • [x] Clean up the implementation

    Summary of changes

    This PR adds functionality to the pipx run <script> command to allow running scripts that have non-stdlib dependencies.

    The script is parsed for a comment block that has the form

    # Requirements:
    # req1
    # req2
    

    The block is terminated by a blank comment line, or by a non-comment line. Requirements may be anything that can be a top-level requirement for pip.

    Before running a script, the code checks for a requirements block. If one is present, it creates a temporary virtual environment (managed the same way as the existing pip run app handles its venvs), installs the requirements there, and runs the script in that environment.

    Implementation issues

    The existing implementation of the Venv class in pipx assumes every environment will have a "main app". The code to write the pipx metadata file enforces this. This is not the case for temporary environments supporting scripts.

    Rather than changing the implementation of Venv to allow environments without apps (which would be an extensive change, as it changes a fundamental invariant of the existing class) I plan on splitting the Venv class into two subclasses - AppVenv and ScriptVenv. All existing uses would become AppVenv instances, with ScriptVenv being for the new functionality.

    One subtlety here is that the code that lists venvs simply scans directories and assumes what it finds is a venv (VenvContainer.iter_venv_dirs). In practice that isn't an issue, as ScriptVenv environments will only be found in the cache directory, which is never scanned in this way (as far as I can tell) but it is a potential risk. I will decide how to handle this when I do the refactoring.

    Test plan

    The PR includes tests of the functionality.

    Also, it can be manually tested by creating a file test.py containing

    # Requirements:
    #     requests
    
    import sys
    import subprocess
    print(sys.executable)
    subprocess.run([sys.executable, "-m", "pip", "list"])
    

    Then run the command

    pipx run file:test.py
    

    Output should show the executable being in a temporary virtual environment, and the pip output will show requests being present (with its dependencies).

    opened by pfmoore 5
  • Check `pyproject.toml` for any potential project limitation/requirements when using `pipx run`

    Check `pyproject.toml` for any potential project limitation/requirements when using `pipx run`

    How would this feature be useful? If I want to run e.g. pipx run pylint, it would be nice if it could be tied to any version requirements I may have specified in my pyproject.toml file for installing pylint for development.

    Describe the solution you'd like If something specified by pipx run is found in pyproject.toml's optional-dependencies, use that dependency specification when installing the tool into the temporary virtual environment. Probably would want to just grab the first requirement found instead of trying to be clever about it.

    Describe alternatives you've considered I've considered not caring. πŸ˜‰ Honestly it probably isn't worth worrying about this idea, but I at least wanted it written down after I thought about it in case anyone else also realized that when you are running a tool for a project there may be certain installation requirements for it.

    opened by brettcannon 2
Releases(1.1.0)
  • 1.1.0(May 28, 2022)

    1.1.0

    • Fix encoding issue on Windows when pip fails to install a package
    • Improve the behaviour of shlex.split on Windows, so paths on Windows can be handled peoperly when they are passed in --pip-args. (#794)
    • Add pipx environment command (#793)
    • Add list --short option to list only package names (#804)
    • [docs] Fix the command for installing development version. (#801)
    • [docs] Fix test status badge in readme file
    • [docs] Add more examples
    • [dev] Change github action job names
    • [docs] Add additional examples for installation from git repos
    • [packaging] Switch to PEP 621
    • Add a CACHEDIR.TAG to the cache directory to prevent it from being included in archives and backups. For more information about cache directory tags, see https://bford.info/cachedir

    What's Changed

    • Fix typos by @kianmeng in https://github.com/pypa/pipx/pull/799
    • Fix the command for installing development version by @meowmeowmeowcat in https://github.com/pypa/pipx/pull/801
    • rename tests and fix badge in readme by @cs01 in https://github.com/pypa/pipx/pull/809
    • align badges, add symlinks to docs at repo root by @cs01 in https://github.com/pypa/pipx/pull/810
    • remove python 3.6 from tests and PyPI classifiers by @cs01 in https://github.com/pypa/pipx/pull/811
    • Improve the behaviour of shlex.split on Windows by @meowmeowmeowcat in https://github.com/pypa/pipx/pull/794
    • remove makefile by @cs01 in https://github.com/pypa/pipx/pull/813
    • Add list --short option by @q0w in https://github.com/pypa/pipx/pull/804
    • Add pipx environment command by @meowmeowmeowcat in https://github.com/pypa/pipx/pull/793
    • various doc updates by @cs01 in https://github.com/pypa/pipx/pull/814
    • fix changelog formatting by @cs01 in https://github.com/pypa/pipx/pull/815
    • Add additional examples for installation from git repos by @taranjlu in https://github.com/pypa/pipx/pull/816
    • Update package metadata by @ofek in https://github.com/pypa/pipx/pull/817
    • readme: fix typo by @imba-tjd in https://github.com/pypa/pipx/pull/827
    • Add a CACHEDIR.TAG to the cache directory. by @KenMacD in https://github.com/pypa/pipx/pull/824
    • 1.1.0 release candidate by @cs01 in https://github.com/pypa/pipx/pull/844
    • Pre-release 1.1.0 by @cs01 in https://github.com/pypa/pipx/pull/845

    New Contributors

    • @kianmeng made their first contribution in https://github.com/pypa/pipx/pull/799
    • @meowmeowmeowcat made their first contribution in https://github.com/pypa/pipx/pull/801
    • @q0w made their first contribution in https://github.com/pypa/pipx/pull/804
    • @taranjlu made their first contribution in https://github.com/pypa/pipx/pull/816
    • @imba-tjd made their first contribution in https://github.com/pypa/pipx/pull/827
    • @KenMacD made their first contribution in https://github.com/pypa/pipx/pull/824

    Full Changelog: https://github.com/pypa/pipx/compare/1.0.0...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 0.17.0(Dec 28, 2021)

  • 0.16.3(May 28, 2021)

    • Organization: pipx is extremely pleased to now be a project of the Python Packaging Authority (PyPA)! Note that our github URL has changed to pypa/pipx
    • Fixed pipx list --json to return valid json with no venvs installed. Previously would return an empty string to stdout. (#681)
    • Changed pipx ensurepath bash behavior so that only one of {~/.profile, ~/.bash\_profile} is modified with the extra pipx paths, not both. Previously, if a .bash_profile file was created where one didn't exist, it could cause problems, e.g. #456. The internal change is to use userpath v1.5.0 or greater. (#684)
    • Changed default nox tests, Github Workflow tests, and pytest behavior to use local pypi server with fixed lists of available packages. This allows greater test isolation (no network pypi access needed) and determinism (fixed available dependencies.) It also allows running the tests offline with some extra preparation beforehand (See Running Unit Tests Offline). The old style tests that use the internet to access pypi.org are still available using nox -s tests_internet or pytest --net-pypiserver tests. (#686)
    • Colorama is now only installed on Windows. (#691)
    Source code(tar.gz)
    Source code(zip)
  • 0.16.2.1(Apr 29, 2021)

    • Changed non-venv-info warnings and notices from pipx list to print to stderr. This especially prevents pipx list --json from printing invalid json to stdout. (#680)
    • Fixed bug that could cause uninstall on Windows with injected packages to uninstall too many apps from the local binary directory. (#679)
    Source code(tar.gz)
    Source code(zip)
  • 0.16.2.0(Apr 27, 2021)

    • Fixed bug #670 where uninstalling a venv could erroneously uninstall other apps from the local binary directory. (#672)
    • Added --json switch to pipx list to output rich json-metadata for all venvs.
    • Ensured log files are utf-8 encoded to preven Unicode encoding errors from occurring with emojis. (#646)
    • Fixed issue which made pipx incorrectly list apps as part of a venv when they were not installed by pipx. (#650)
    • Fixed old regression that would prevent pipx uninstall from cleaning up linked binaries if the venv was old and did not have pipx metadata. (#651)
    • Fixed bugs with suffixed-venvs on Windows. Now properly summarizes install, and actually uninstalls associated binaries for suffixed-venvs. (#653)
    • Changed venv minimum python version to 3.6, removing python 3.5 which is End of Life. (#666)
    Source code(tar.gz)
    Source code(zip)
  • 0.16.1.0(Feb 26, 2021)

    • Introduce the pipx.run entry point group as an alternative way to declare an application for pipx run. (#615)
    • Fix cursor show/hide to work with older versions of Windows. (#610)
    • Support text colors on Windows. (#612)
    • Better platform unicode detection to avoid errors and allow showing emojis when possible. (#614)
    • Don't emit show cursor or hide cursor codes if STDERR is not a tty. (#620)
    • Sped up pipx list (#624).
    • pip errors no longer stream to the shell when pip fails during a pipx install. pip's output is now saved to a log file. In the shell, pipx will tell you the location of the log file and attempt to summarize why pip failed. (#625)
    • For reinstall-all, fixed bug where missing python executable would cause error. (#634)
    • Fix regression which prevented pipx from working with pythonloc (and __pypackages__ folder). (#636)
    Source code(tar.gz)
    Source code(zip)
  • 0.16.0.0(Jan 16, 2021)

    • New venv inspection! The code that pipx uses to examine and determine metadata in an installed venv has been made faster, better, and more reliable. It now uses modern python libraries like packaging and importlib.metadata to examine installed venvs. It also now properly handles installed package extras. In addition, some problems pipx has had with certain characters (like periods) in package names should be remedied.
    • Added reinstall command for reinstalling a single venv.
    • Changed pipx run on non-Windows systems to actually replace pipx process with the app process instead of running it as a subprocess. (Now using python's os.exec*)
    • [bugfix] Fixed bug with reinstall-all command when package have been installed using a specifier. Now the initial specifier is used.
    • [bugfix] Override display of PIPX_DEFAULT_PYTHON value when generating web documentation for pipx install #523
    • [bugfix] Wrap help documentation for environment variables.
    • [bugfix] Fixed uninstall crash that could happen on Windows for certain packages
    • [feature] Venv package name arguments now do not have to match exactly as pipx has them stored, but can be specified in any python-package-name-equivalent way. (i.e. case does not matter, and ., -, _ characters are interchangeable.)
    • [change] Venvs with a suffix: A suffix can contain any characters, but for purposes of uniqueness, python package name rules apply--upper- and lower-case letters are equivalent, and any number of ., -, or _ characters in a row are equivalent. (e.g. if you have a suffixed venv pylint_1.0A you could not add another suffixed venv called pylint--1-0a, as it would not be a unique name.)
    • [implementation detail] Pipx shared libraries (providing pip, setuptools, wheel to pipx) are no longer installed using pip arguments taken from the last regular pipx install. If you need to apply pip arguments to pipx's use of pip for its internal shared libraries, use PIP_* environment variables.
    • [feature] Autocomplete for venv names is no longer restricted to an exact match to the literal venv name, but will autocomplete any logically-similar python package name (i.e. case does not matter, and ., -, _ characters are all equivalent.)
    • pipx now reinstalls its internal shared libraries when the user executes reinstall-all.
    • Made sure shell exit codes from every pipx command are correct. In the past some (like from pipx upgrade) were wrong. The exit code from pipx runpip is now the exit code from the pip command run. The exit code from pipx list will be 1 if one or more venvs have problems that need to be addressed.
    • pipx now writes a log file for each pipx command executed to $PIPX_HOME/logs, typically ~/.local/pipx/logs. pipx keeps the most recent 10 logs and deletes others.
    • pipx upgrade and pipx upgrade-all now have a --upgrade-injected option which directs pipx to also upgrade injected packages.
    • pipx list now detects, identifies, and suggests a remedy for venvs with old-internal data (internal venv names) that need to be updated.
    • Added a "Troubleshooting" page to the pipx web documentation for common problems pipx users may encounter.
    • pipx error, warning, and other messages now word-wrap so words are not split across lines. Their appearance is also now more consistent.
    Source code(tar.gz)
    Source code(zip)
  • 0.15.6.0(Oct 17, 2020)

    • [docs] Update license
    • [bugfix] Fixed regression in list, inject, upgrade, reinstall-all commands when suffixed packages are used.
    • [bugfix] Do not reset package url during upgrade when main package is pipx
    • Updated help text to show description for ensurepath and completions help
    • Added support for user-defined default python interpreter via new PIPX_DEFAULT_PYTHON. Helpful for use with pyenv among other uses.
    • [bugfix] Fixed bug where extras were ignored with a PEP 508 package specification with a URL.
    Source code(tar.gz)
    Source code(zip)
  • 0.15.5.1(Aug 27, 2020)

  • 0.15.5.0(Aug 22, 2020)

    • [feature] Version of each injected package is now listed after name for pipx list --include-injected
    • [feature] --suffix option for install to allow multiple versions of same tool to be installed (#445)
    • [feature] ensurepath now also ensures that pip user binary path containing pipx itself is in user's PATH if pipx was installed using pip install --user.
    • Change metadata recorded from version-specified app install to allow upgrades in future. Adds pipx dependency on packaging package.
    • pipx now parses package specification before install. It removes (with warning) the --editable install option for any package specification that is not a local path. It also removes (with warning) any environment markers.
    • Disabled animation when we cannot determine terminal size or if the number of columns is too small. (Fixes #444)
    • [bugfix] Prevent python error in case where package has no pipx metadata and advise user how to fix.
    • [bugfix] For pipx install, fixed failure to install if user has PIP_USER=1 or user=true in pip.conf. (#110)
    • [bugfix] Requiring userpath v1.4.1 or later so ensure Windows bug is fixed for ensurepath (#437)
    • [feature] pipx logs its own version in verbose mode (#423)
    Source code(tar.gz)
    Source code(zip)
  • 0.15.4.0(May 27, 2020)

  • 0.15.3.1(May 18, 2020)

  • 0.15.1.3(Jan 21, 2020)

    Fix Windows bug to ensure accurate app installation and reporting. Fix bug in install in certain situations involving user-specified python executable.

    Source code(tar.gz)
    Source code(zip)
  • 0.15.1.2(Jan 8, 2020)

  • 0.15.1.1(Jan 8, 2020)

  • 0.15.1.0(Jan 7, 2020)

  • 0.15.0.0(Jan 5, 2020)

  • 0.14.0.0(Aug 11, 2019)

  • 0.13.2.2(Aug 3, 2019)

  • 0.13.2.1(Aug 1, 2019)

A software manager for easy development and distribution of Python code

Piper A software manager for easy development and distribution of Python code. The main features that Piper adds to Python are: Support for large-scal

13 Nov 22, 2022
Example for how to package a Python library based on Cython.

Cython sample module This project is an example of a module that can be built using Cython. It is an upgrade from a similar model developed by Arin Kh

Juan JosΓ© GarcΓ­a Ripoll 4 Aug 28, 2022
The Python package installer

pip - The Python Package Installer pip is the package installer for Python. You can use pip to install packages from the Python Package Index and othe

Python Packaging Authority 8.4k Dec 30, 2022
OS-agnostic, system-level binary package manager and ecosystem

Conda is a cross-platform, language-agnostic binary package manager. It is the package manager used by Anaconda installations, but it may be used for

Conda 5.1k Jan 07, 2023
PokerFace is a Python package for various poker tools.

PokerFace is a Python package for various poker tools. The following features are present in PokerFace... Types for cards and their componen

Juho Kim 21 Dec 29, 2022
Python dependency management and packaging made easy.

Poetry: Dependency Management for Python Poetry helps you declare, manage and install dependencies of Python projects, ensuring you have the right sta

Poetry 23.1k Jan 01, 2023
local pypi server (custom packages and auto-mirroring of pypi)

localshop A PyPI server which automatically proxies and mirrors PyPI packages based upon packages requested. It has support for multiple indexes and t

Michael van Tellingen 383 Sep 23, 2022
Python Environment & Package Manager

Python Environment Manager A Visual Studio Code extension that provides the ability to via and manage all of your Python environments & packages from

Don Jayamanne 72 Dec 29, 2022
pip-run - dynamic dependency loader for Python

pip-run provides on-demand temporary package installation for a single interpreter run. It replaces this series of commands (or their Windows equivale

Jason R. Coombs 79 Dec 14, 2022
A PyPI mirror client according to PEP 381 http://www.python.org/dev/peps/pep-0381/

This is a PyPI mirror client according to PEP 381 + PEP 503 http://www.python.org/dev/peps/pep-0381/. bandersnatch =4.0 supports Linux, MacOSX + Wind

Python Packaging Authority 345 Dec 28, 2022
Cilantropy: a Python Package Manager interface created to provide an "easy-to-use" visual and also a command-line interface for Pythonistas.

Cilantropy Cilantropy is a Python Package Manager interface created to provide an "easy-to-use" visual and also a command-line interface for Pythonist

48 Dec 16, 2022
pipreqs - Generate pip requirements.txt file based on imports of any project. Looking for maintainers to move this project forward.

pipreqs - Generate requirements.txt file for any project based on imports Installation pip install pipreqs Usage Usage: pipreqs [options] path

Vadim Kravcenko 4.8k Dec 31, 2022
A flexible package manager that supports multiple versions, configurations, platforms, and compilers.

Spack Spack is a multi-platform package manager that builds and installs multiple versions and configurations of software. It works on Linux, macOS, a

Spack 3.1k Jan 09, 2023
The Python Package Index

Warehouse Warehouse is the software that powers PyPI. See our development roadmap, documentation, and architectural overview. Getting Started You can

Python Packaging Authority 3.1k Jan 01, 2023
Conan - The open-source C/C++ package manager

Conan Decentralized, open-source (MIT), C/C++ package manager. Homepage: https://conan.io/ Github: https://github.com/conan-io/conan Docs: https://doc

Conan.io 6.5k Jan 05, 2023
Install All Basic Termux Packages To Your Phone

~All-Packages~ The Easiest Way To Install All Termux Packages πŸ€— Tool By β’Ήβ“ˆα­„ΚœΚα΄…Κ€α΄€βœ˜ΰΉ›Λ’α΄Έ πŸ‘‡ Contact Me On πŸ‘‡ AVAILABLE ON : Termux TESTED ON : Term

β’Ήβ“ˆ ʜʏΝ₯α΄…α·§Κ€α·Ÿα΄€βœ˜ΰΉ›Λ’α΄Έ 7 Nov 12, 2022
A set of tools to keep your pinned Python dependencies fresh.

pip-tools = pip-compile + pip-sync A set of command line tools to help you keep your pip-based packages fresh, even when you've pinned them. You do pi

Jazzband 6.5k Dec 29, 2022
Workon - A simple project manager for conda, windows 10 and vscode

WORK ON A simple project manager for conda, windows 10 and vscode Installation p

Jesus Alan Hernandez Galvan 1 Jan 16, 2022
Template repo for a GCP-hosted REST API with automatic API versioning and custom domain mapping

Python + Poetry REST API with FastAPI, hosted on GCP This template will get you ready to deploy a FastAPI app in Google Cloud with automatic API versi

Kevin Duff 10 Dec 25, 2022
:package: :fire: Python project management. Manage packages: convert between formats, lock, install, resolve, isolate, test, build graph, show outdated, audit. Manage venvs, build package, bump version.

THE PROJECT IS ARCHIVED Forks: https://github.com/orsinium/forks DepHell -- project management for Python. Why it is better than all other tools: Form

DepHell 1.7k Dec 30, 2022