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.

Installation instructions don't work (pyenv problems)

See original GitHub issue
 ~ $ python3 -m pip install --user pipx
Collecting pipx
  Downloading https://files.pythonhosted.org/packages/bd/16/4dd481c913d748928df79a78dfbf6ce3f42ec5382b630d78f3fd0ef0d8bd/pipx-0.14.0.0-py3-none-any.whl
Collecting userpath (from pipx)
  Downloading https://files.pythonhosted.org/packages/8c/71/72611cc9aed89374326645a4069787328db573c842e4e37b78c022b18146/userpath-1.2.0-py2.py3-none-any.whl
Collecting argcomplete<2.0,>=1.9.4 (from pipx)
  Downloading https://files.pythonhosted.org/packages/4d/82/f44c9661e479207348a979b1f6f063625d11dc4ca6256af053719bbb0124/argcomplete-1.10.0-py2.py3-none-any.whl
Collecting distro (from userpath->pipx)
  Downloading https://files.pythonhosted.org/packages/ea/35/82f79b92fa4d937146c660a6482cee4f3dfa1f97ff3d2a6f3ecba33e712e/distro-1.4.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: distro, click, userpath, argcomplete, pipx
  WARNING: The script distro is installed in '/Users/anentropic/Library/Python/3.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script userpath is installed in '/Users/anentropic/Library/Python/3.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pipx is installed in '/Users/anentropic/Library/Python/3.7/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed argcomplete-1.10.0 click-7.0 distro-1.4.0 pipx-0.14.0.0 userpath-1.2.0
 ~ $ python3 -m pipx ensurepath
The directory `/Users/anentropic/.local/bin` is already in PATH. If you are sure you want to proceed, try again with the '--force' flag.

Otherwise pipx is ready to go! ✨ 🌟 ✨
 ~ $ pipx run https://raw.githubusercontent.com/pipxproject/pipx/master/scripts/migrate_pipsi_to_pipx.py
-bash: pipx: command not found

I guess this is some kind of unanticipated interaction with pyenv

This fixed it:

$ pip uninstall pipx
$ pyenv shell 3.7.4
$ pip install pipx

it was the pyenv shell specifically which seemed to be out of sync, before setting that it had installed pipx to one of my other python 3s which was not currently on the PATH

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
anentropiccommented, Feb 21, 2020

after reading https://github.com/standardebooks/tools/issues/188 I can report that installing without --user flag as suggested there works (after all of the above):

$ python3 -m pip uninstall pipx
Uninstalling pipx-0.15.1.3:
  Would remove:
    /Users/anentropic/Library/Python/3.7/bin/pipx
    /Users/anentropic/Library/Python/3.7/lib/python/site-packages/pipx-0.15.1.3.dist-info/*
    /Users/anentropic/Library/Python/3.7/lib/python/site-packages/pipx/*
Proceed (y/n)? y
  Successfully uninstalled pipx-0.15.1.3

$ python3 -m pip install pipx
Collecting pipx
  Using cached https://files.pythonhosted.org/packages/c3/63/b461c6996147fe72f7af6a1e108c817a8fa41d9bd744863b4993c8788553/pipx-0.15.1.3-py3-none-any.whl
Requirement already satisfied: argcomplete<2.0,>=1.9.4 in /Users/anentropic/Library/Python/3.7/lib/python/site-packages (from pipx) (1.10.0)
Requirement already satisfied: userpath in /Users/anentropic/Library/Python/3.7/lib/python/site-packages (from pipx) (1.2.0)
Requirement already satisfied: distro in /Users/anentropic/Library/Python/3.7/lib/python/site-packages (from userpath->pipx) (1.4.0)
Requirement already satisfied: click in /Users/anentropic/Library/Python/3.7/lib/python/site-packages (from userpath->pipx) (7.0)
Installing collected packages: pipx
Successfully installed pipx-0.15.1.3

$ pipx --version
0.15.1.3

🎉 🎉 🎉

1reaction
itsayellowcommented, Feb 21, 2020

The current instructions for macOS (which I assume you’re using because you’re using Homebrew are (from the README.md at https://github.com/pipxproject/pipx):

On macOS:

brew install pipx
pipx ensurepath

I think the key here is that https://pipxproject.github.io/pipx/installation/ does not have the OS-specific installation instructions that README.md does. We need to fix that.

Another thing to note is that when you install using pip install --user pipx the pipx binary is put in a specific directory that depends on which python you are using. This may or may not already be in your PATH if you’re using a non-standard python (like one of the pyenv versions.) The pipx ensurepath step only puts the binary directory for your pipx packages in your path. I suppose we could look at ensuring that pipx is in your path also at this step.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installation instructions don't work (pyenv problems) · Issue #208
But they don't work if you already have pyenv installed. Firstly: $ python3 -m pip install --user pipx pyenv: python3: command not found....
Read more >
Cannot switch Python with pyenv - Stack Overflow
For me the problem was that a package installed another python version as a dependency and screwed my pyenv. Doing this will ensure...
Read more >
How to Manage Multiple Python Versions on an Apple Silicon ...
It's really easy to install and manage multiple versions of Python using pyenv. See the documentation for full details, but here are the...
Read more >
Use Pyenv to Streamline your Python Projects - Nicky Marino
There are two hard problems to solve in a Python project: installing packages, and installing packages in other projects. Over the years, the ......
Read more >
Deep dive into how pyenv actually works by leveraging the ...
It's important to understand how pyenv works to debug issues. ... Run pyenv install --list to see the Python versions that can be...
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