question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Some executables not linked during pipx install

See original GitHub issue

pipx install is not finding all executables for certain packages.

For example, here is what happened when I tried to install jupyter using pipx:

$ pipx install jupyter --include-deps
  installed package jupyter 1.0.0, Python 3.7.3
  These binaries are now globally available
    - iptest
    - iptest3
    - ipython
    - ipython3
    - jupyter-bundlerextension
    - jupyter-console
    - jupyter-kernel
    - jupyter-kernelspec
    - jupyter-nbconvert
    - jupyter-nbextension
    - jupyter-notebook
    - jupyter-qtconsole
    - jupyter-run
    - jupyter-serverextension
    - jupyter-trust
done! ✨ 🌟 ✨
$ 
$ 
$ jupyter
-bash: jupyter: command not found
$ which jupyter
$ 
$ cd ~/.local/bin
$ ls *jupyter*
jupyter-bundlerextension jupyter-nbconvert        jupyter-run
jupyter-console          jupyter-nbextension      jupyter-serverextension
jupyter-kernel           jupyter-notebook         jupyter-trust
jupyter-kernelspec       jupyter-qtconsole
$ # Looking in ~/.local/bin, none found.
$ 
$ cd ~/.local/pipx/venvs/jupyter/bin/
$ ls *jupyter*
jupyter                  jupyter-migrate          jupyter-run
jupyter-bundlerextension jupyter-nbconvert        jupyter-serverextension
jupyter-console          jupyter-nbextension      jupyter-troubleshoot
jupyter-kernel           jupyter-notebook         jupyter-trust
jupyter-kernelspec       jupyter-qtconsole
$ # Looking in ~/.local/pipx/venvs/jupyter/bin. Expected no `jupyter` executable;
$ # found `jupyter` executable, as well as `jupyter-migrate` and
$ # `jupyter-troubleshoot`, none of which were not found in ~/.local/bin.

According to the readme’s “How it Works” section, pipx install scans the new virtualenv’s bin/ directory, then links found executables into ~/.local/bin.

Further, output included in a comment from a previous issue indicates that pipx properly linked jupyter, jupyter-migrate and jupyter-troubleshoot into ~/.local/bin. Is this a regression?

I am running macOS 10.14.4 and Python 3.7.3 installed with pyenv. pipx is likewise using Python 3.7.3.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
itsayellowcommented, Jan 8, 2020

I have a functional branch that fixes this and still avoids infinite recursion. I’ll make sure it’s ok and submit tomorrow.

2reactions
itsayellowcommented, Jan 8, 2020

I think the problem is in venv_metadata_inspector _dfs_package_apps:

Specifically if this function finds apps for a particular package, it will NOT search that package’s dependency tree for apps. (Which is NOT correct.)

In this code:

    for d in dependencies:
        app_names = get_apps(d, bin_path)
        if app_names:
            apps = [str(Path(bin_path) / app) for app in app_names]
            app_paths_of_dependencies[d] = apps
        # recursively search for more
        if d not in app_paths_of_dependencies:
            # only search if this package isn't already listed to avoid
            # infinite recursion
            app_paths_of_dependencies = _dfs_package_apps(
                bin_path, d, app_paths_of_dependencies
            )

If the following statement is removed:

        if d not in app_paths_of_dependencies:

Then everything seems to work fine. jupyter is installed without that statement.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Some executables not linked during pipx install #143 - GitHub
pipx install is not finding all executables for certain packages. For example, here is what happened when I tried to install jupyter using...
Read more >
Unable to install brownie using pipx - python - Stack Overflow
I used the github installation method and it worked for me, these are the commands that I used on VSCode terminal.
Read more >
pipx — Install and Run Python Applications in Isolated ...
WARNING: The script pipx.exe is installed in `<USER folder>\AppData\Roaming\Python\Python3x\Scripts` which is not on PATH. If so, go to the mentioned folder ...
Read more >
pipx · PyPI
pipx : execute binaries from Python packages in isolated environments ... 'sudo' is not required to do this. pipx install PACKAGE pipx ......
Read more >
Introduction | Documentation | Poetry - Python dependency ...
Any installs performed using get-poetry.py should be uninstalled and reinstalled using install.python-poetry.org to ensure in-place upgrades are possible.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found