Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For some CLI tools dependencies are not installed #290

Closed
albdv opened this issue Dec 10, 2019 · 12 comments
Closed

For some CLI tools dependencies are not installed #290

albdv opened this issue Dec 10, 2019 · 12 comments

Comments

@albdv
Copy link

albdv commented Dec 10, 2019

For some CLI tools click as a dependency is not installed and even after doing pipx inject it still fails to run.

You can find a codesnippet here:

 ~ pipx --version                                                                                                                                                                                             
0.14.0.0

  ~ pipx install doc2dash                                                                                                                                                                                      installed package doc2dash 2.3.0, Python 3.7.5
These apps are now globally available
   - doc2dash
done! ✨ 🌟 ✨

 ~ doc2dash                                                                                                                                                                                                   
Traceback (most recent call last):
  File "/Users/user/.local/bin//doc2dash", line 5, in <module>
    from doc2dash.__main__ import main
  File "/Users/user/.local/pipx/venvs/doc2dash/lib/python3.7/site-packages/doc2dash/__main__.py", line 13, in <module>
    import click
ModuleNotFoundError: No module named 'click'

 ~ pipx inject doc2dash click                                                                                                                                                                               
done! ✨ 🌟 ✨

doc2dash                                                                                                                                                                                                   
Traceback (most recent call last):
  File "/Users/user/.local/bin//doc2dash", line 5, in <module>
    from doc2dash.__main__ import main
  File "/Users/user/.local/pipx/venvs/doc2dash/lib/python3.7/site-packages/doc2dash/__main__.py", line 13, in <module>
    import click
ModuleNotFoundError: No module named 'click'

~/.local/pipx/venvs/doc2dash/bin/python -m pip install click

 ~ doc2dash                                                                                                                                                                                                   
Usage: doc2dash [OPTIONS] SOURCE
Try "doc2dash --help" for help.

Error: Missing argument "SOURCE".

How to reproduce

 ~ pipx install doc2dash --verbose                                                                                                                                                                            
pipx > (run_pipx_command:134): Virtual Environment location is /Users/user/.local/pipx/venvs/doc2dash
pipx > (run:97): running /usr/local/opt/python/bin/python3.7 -m venv --without-pip /Users/user/.local/pipx/venvs/doc2dash
pipx > (run:97): running /Users/user/.local/pipx/venvs/doc2dash/bin/python -m pip install doc2dash
Collecting doc2dash
  Using cached https://files.pythonhosted.org/packages/2f/20/c0d9eecb24af0006949e294866a6462c1bfbd8b971db2b60fcfe0f737138/doc2dash-2.3.0-py2.py3-none-any.whl
Requirement already satisfied: click in /usr/local/Cellar/pipx/0.14.0.0/libexec/lib/python3.7/site-packages (from doc2dash) (7.0)
Collecting beautifulsoup4
  Using cached https://files.pythonhosted.org/packages/3b/c8/a55eb6ea11cd7e5ac4bacdf92bac4693b90d3ba79268be16527555e186f0/beautifulsoup4-4.8.1-py3-none-any.whl
Collecting six
  Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Collecting Sphinx
  Using cached https://files.pythonhosted.org/packages/be/a4/f42463e18bb36a47325d43004ab6f4afb5c863e6ffdb936104acc15cfc11/Sphinx-2.2.2-py3-none-any.whl
Collecting zope.interface
  Using cached https://files.pythonhosted.org/packages/46/f8/d6f022f17d5c5d229b0003555d2fe7846069ade155d7babefdaa97173281/zope.interface-4.7.1-cp37-cp37m-macosx_10_6_intel.whl
Collecting attrs
  Using cached https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Collecting colorama
  Using cached https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl
Collecting soupsieve>=1.2
  Using cached https://files.pythonhosted.org/packages/81/94/03c0f04471fc245d08d0a99f7946ac228ca98da4fa75796c507f61e688c2/soupsieve-1.9.5-py2.py3-none-any.whl
Collecting requests>=2.5.0
  Using cached https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl
Collecting Jinja2>=2.3
  Using cached https://files.pythonhosted.org/packages/65/e0/eb35e762802015cab1ccee04e8a277b03f1d8e53da3ec3106882ec42558b/Jinja2-2.10.3-py2.py3-none-any.whl
Collecting sphinxcontrib-devhelp
  Using cached https://files.pythonhosted.org/packages/b0/a3/fea98741f0b2f2902fbf6c35c8e91b22cd0dd13387291e81d457f9a93066/sphinxcontrib_devhelp-1.0.1-py2.py3-none-any.whl
Collecting imagesize
  Using cached https://files.pythonhosted.org/packages/fc/b6/aef66b4c52a6ad6ac18cf6ebc5731ed06d8c9ae4d3b2d9951f261150be67/imagesize-1.1.0-py2.py3-none-any.whl
Collecting sphinxcontrib-jsmath
  Using cached https://files.pythonhosted.org/packages/c2/42/4c8646762ee83602e3fb3fbe774c2fac12f317deb0b5dbeeedd2d3ba4b77/sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl
Collecting sphinxcontrib-htmlhelp
  Using cached https://files.pythonhosted.org/packages/e4/35/80a67cc493f4a8a9634ab203a77aaa1b84d79ccb1c02eca72cb084d2c7f7/sphinxcontrib_htmlhelp-1.0.2-py2.py3-none-any.whl
Collecting Pygments>=2.0
  Using cached https://files.pythonhosted.org/packages/be/39/32da3184734730c0e4d3fa3b2b5872104668ad6dc1b5a73d8e477e5fe967/Pygments-2.5.2-py2.py3-none-any.whl
Collecting snowballstemmer>=1.1
  Using cached https://files.pythonhosted.org/packages/7d/4b/cdf1113a0e88b641893b814e9c36f69a6fda28cd88b62c7f0d858cde3166/snowballstemmer-2.0.0-py2.py3-none-any.whl
Collecting packaging
  Using cached https://files.pythonhosted.org/packages/cf/94/9672c2d4b126e74c4496c6b3c58a8b51d6419267be9e70660ba23374c875/packaging-19.2-py2.py3-none-any.whl
Collecting sphinxcontrib-qthelp
  Using cached https://files.pythonhosted.org/packages/ce/5b/4747c3ba98b3a3e21a66faa183d8f79b9ded70e74212a7988d236a6eb78a/sphinxcontrib_qthelp-1.0.2-py2.py3-none-any.whl
Collecting docutils>=0.12
  Using cached https://files.pythonhosted.org/packages/22/cd/a6aa959dca619918ccb55023b4cb151949c64d4d5d55b3f4ffd7eee0c6e8/docutils-0.15.2-py3-none-any.whl
Requirement already satisfied: setuptools in ./.local/pipx/shared/lib/python3.7/site-packages (from Sphinx->doc2dash) (42.0.2)
Collecting alabaster<0.8,>=0.7
  Using cached https://files.pythonhosted.org/packages/10/ad/00b090d23a222943eb0eda509720a404f531a439e803f6538f35136cae9e/alabaster-0.7.12-py2.py3-none-any.whl
Collecting sphinxcontrib-applehelp
  Using cached https://files.pythonhosted.org/packages/13/9a/4428b3114d654cb1cd34d90d5e6fab938d5436f94a571155187ea1dd78b4/sphinxcontrib_applehelp-1.0.1-py2.py3-none-any.whl
Collecting babel!=2.0,>=1.3
  Using cached https://files.pythonhosted.org/packages/2c/60/f2af68eb046c5de5b1fe6dd4743bf42c074f7141fe7b2737d3061533b093/Babel-2.7.0-py2.py3-none-any.whl
Collecting sphinxcontrib-serializinghtml
  Using cached https://files.pythonhosted.org/packages/57/b3/3648e48fa5682e61e9839d62de4e23af1795ceb738d68d73bd974257a95c/sphinxcontrib_serializinghtml-1.1.3-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting certifi>=2017.4.17
  Using cached https://files.pythonhosted.org/packages/b9/63/df50cac98ea0d5b006c55a399c3bf1db9da7b5a24de7890bc9cfd5dd9e99/certifi-2019.11.28-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached https://files.pythonhosted.org/packages/b4/40/a9837291310ee1ccc242ceb6ebfd9eb21539649f193a7c8c86ba15b98539/urllib3-1.25.7-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23
  Using cached https://files.pythonhosted.org/packages/ce/c6/f000f1af136ef74e4a95e33785921c73595c5390403f102e9b231b065b7a/MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl
Collecting pyparsing>=2.0.2
  Using cached https://files.pythonhosted.org/packages/c0/0c/fc2e007d9a992d997f04a80125b0f183da7fb554f1de701bbb70a8e7d479/pyparsing-2.4.5-py2.py3-none-any.whl
Collecting pytz>=2015.7
  Using cached https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl
Installing collected packages: soupsieve, beautifulsoup4, six, idna, certifi, chardet, urllib3, requests, MarkupSafe, Jinja2, sphinxcontrib-devhelp, imagesize, sphinxcontrib-jsmath, sphinxcontrib-htmlhelp, Pygments, snowballstemmer, pyparsing, packaging, sphinxcontrib-qthelp, docutils, alabaster, sphinxcontrib-applehelp, pytz, babel, sphinxcontrib-serializinghtml, Sphinx, zope.interface, attrs, colorama, doc2dash
Successfully installed Jinja2-2.10.3 MarkupSafe-1.1.1 Pygments-2.5.2 Sphinx-2.2.2 alabaster-0.7.12 attrs-19.3.0 babel-2.7.0 beautifulsoup4-4.8.1 certifi-2019.11.28 chardet-3.0.4 colorama-0.4.3 doc2dash-2.3.0 docutils-0.15.2 idna-2.8 imagesize-1.1.0 packaging-19.2 pyparsing-2.4.5 pytz-2019.3 requests-2.22.0 six-1.13.0 snowballstemmer-2.0.0 soupsieve-1.9.5 sphinxcontrib-applehelp-1.0.1 sphinxcontrib-devhelp-1.0.1 sphinxcontrib-htmlhelp-1.0.2 sphinxcontrib-jsmath-1.0.1 sphinxcontrib-qthelp-1.0.2 sphinxcontrib-serializinghtml-1.1.3 urllib3-1.25.7 zope.interface-4.7.1
  installed package doc2dash 2.3.0, Python 3.7.5
  These apps are now globally available
    - doc2dash
done! ✨ 🌟 ✨

Expected behavior
working package after installation

@uranusjr
Copy link
Member

Sorry if I’m way off, but do you happen to have the environment variable PIP_USER set in your shell?

@albdv
Copy link
Author

albdv commented Dec 10, 2019

no I do not have such env var set.

@clbarnes
Copy link
Contributor

How did you install pipx? It's not installing click because it thinks it's already installed. It thinks that because it can find the site-packages directory in a tree below ~/pipx; it probably doesn't have access to that at runtime. If that directory is on one of your path variables, which may get mangled by pipx later, that might explain it?

@albdv
Copy link
Author

albdv commented Dec 10, 2019

Installed with brew

Requirement already satisfied: click in /usr/local/Cellar/pipx/0.14.0.0/libexec/lib/python3.7/site-packages (from doc2dash) (7.0)

It things that click requirements satisfied by packages in libexec of pipx package.
Should it be isolated during installation of the package like it is when we execute it or I'm out of idea why during the installation it could solve the dependency and fails on exec state.

@uranusjr
Copy link
Member

uranusjr commented Dec 10, 2019

I kind of recall some similar issues from Pipenv installed via Homebrew… Did you upgrade the python formula to 3.8? (edit: check the output of brew info python to know what Python version you’re on)

@albdv
Copy link
Author

albdv commented Dec 10, 2019

https://formulae.brew.sh/formula/python
Currently available version of python via brew is 3.7.5

~ brew info python                                                                                                                          
python: stable 3.7.5 (bottled), HEAD

No I didn't upgrade python to 3.8

@uranusjr
Copy link
Member

Or did you upgrade python (say from 3.7.4 to 3.7.5) after installing pipx? Also try brew update && brew upgrade pipx and see if that helps. (Sorry if I seem to keep asking weird questions without helping much.)

@albdv
Copy link
Author

albdv commented Dec 10, 2019

 ~ brew info pipx                                                                                                                            
pipx: stable 0.14.0.0 (bottled)
Execute binaries from Python packages in isolated environments
https://github.com/pipxproject/pipx
/usr/local/Cellar/pipx/0.14.0.0 (120 files, 854.8KB) *
  Poured from bottle on 2019-12-10 at 11:46:19

Installed after upgrade to python 3.7.5 with brew.
No problems, feel free to ask me whatever you need.

@cs01
Copy link
Member

cs01 commented Dec 10, 2019

This looks similar to #233 which was fixed in master but not yet released on PyPI.

@cs01
Copy link
Member

cs01 commented Dec 12, 2019

@Beastea does the master branch of pipx work for you? You can test it out with

pipx run --spec git+https://github.com/pipxproject/pipx.git pipx install doc2dash --force

@albdv
Copy link
Author

albdv commented Dec 12, 2019

@cs01 I've got a workaround right now and I've checked the issue referenced. It looks exactly like what I'm experiencing now. Fix looks good to me and I could live untill the next version with what I have now, I'm sorry to bother you but I wasn't been able to find a similar issue with the search. But now all fine. Thanks in advance. Looking forward for next release.

@albdv albdv closed this as completed Dec 12, 2019
@cs01
Copy link
Member

cs01 commented Dec 12, 2019

Nice! No need to apologize, it was a valid bug you ran into. And thanks @uranusjr and @clbarnes for helping out as well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants