mattsb42-meta / pipx-in-pipx

Bootstrap your pipx with pipx.
Apache License 2.0
66 stars 9 forks source link

error encountered during install #4

Open mattsb42-aws opened 5 years ago

mattsb42-aws commented 5 years ago

Installing on a new system raised an error. It looks like this was caused by userpath verify writing to stderr because the shell needed to be restarted.

I think that it would be reasonable to just remove this verify step, as the userpath append step already checks this and prints out the necessary shell restart instructions if needed.

python3 -m pip install pipipxx 
Collecting pipipxx
  Using cached https://files.pythonhosted.org/packages/d0/5f/8e4cd1ea2204c49828cde06dcf553652a0481c8248ec167352f2de727603/pipipxx-0.0.1b0.tar.gz
Building wheels for collected packages: pipipxx
  Building wheel for pipipxx (setup.py) ... error
  Complete output from command /usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/js/2v2h7g8x6hbcz8jwcmvlf3vm74bc_0/T/pip-install-gdoyhuu2/pipipxx/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /private/var/folders/js/2v2h7g8x6hbcz8jwcmvlf3vm74bc_0/T/pip-wheel-p5imru59 --python-tag cp37:
  running bdist_wheel
  running build
  installing to build/bdist.macosx-10.12-x86_64/wheel
  running install
  ################# Building bootstrapping venv ##################
  Collecting pip
    Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)
  Installing collected packages: pip
    Found existing installation: pip 18.1
      Uninstalling pip-18.1:
        Successfully uninstalled pip-18.1
  Successfully installed pip-19.1.1

  Collecting pipx
    Downloading https://files.pythonhosted.org/packages/24/99/367b58dadc52b0c4b318a8e23a1d574be9b2df01634635661deaeb10eba1/pipx-0.13.1.1-py3-none-any.whl
  Collecting userpath
    Downloading https://files.pythonhosted.org/packages/23/8c/be43c12d4a78247491bf39f223d5f9e88312adb220e9f22a4cda6e478137/userpath-1.1.0-py2.py3-none-any.whl
  Collecting click (from userpath)
    Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
  Installing collected packages: click, userpath, pipx
  Successfully installed click-7.0 pipx-0.13.1.1 userpath-1.1.0

  ######## Installing local pipx using bootstrapping pipx ########
    installed package pipx 0.13.1.1, Python 3.7.2
    These binaries are now globally available
      - pipx
  done! ✨ 🌟 ✨

  ⚠️  Note: '/Users/xxxx/.local/bin' is not on your PATH environment variable. These binaries will not be globally accessible until your PATH is updated. Run `userpath append ~/.local/bin` to automatically add it, or manually modify your PATH in your shell's config file (i.e. ~/.bashrc).

  ############ Verifying that PATH includes local bin ############
  Success!

  The directory `/Users/xxxx/.local/bin` is in PATH, pending a shell restart!

  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/js/2v2h7g8x6hbcz8jwcmvlf3vm74bc_0/T/pip-install-gdoyhuu2/pipipxx/setup.py", line 57, in <module>
      cmdclass=dict(install=BootstrapInstall),
    File "/usr/local/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
      return distutils.core.setup(**attrs)
    File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/usr/local/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 244, in run
      self.egg2dist(self.egginfo_dir, distinfo_dir)
    File "/usr/local/lib/python3.7/site-packages/wheel/bdist_wheel.py", line 341, in egg2dist
      raise ValueError(err)
  ValueError: Egg metadata expected at build/bdist.macosx-10.12-x86_64/wheel/pipipxx-0.0.1b0-py3.7.egg-info but not found

  ----------------------------------------
  Failed building wheel for pipipxx
  Running setup.py clean for pipipxx
Failed to build pipipxx
Installing collected packages: pipipxx
  Running setup.py install for pipipxx ... done
Successfully installed pipipxx
mattsb42-aws commented 5 years ago

Interestingly, because everything happens when building the wheel and not actually when "installing" the package, the install still succeeds even though an error was thrown.

In this particular case that's fine, because it did actually succeed at everything we needed, but it might be worth figuring out how to make the install actually fail if a real error is encountered.

salotz-sitx commented 2 years ago

I also get this

salotz-sitx commented 2 years ago

btw I think python3 -m pip install --no-binary ':all:' pipx-in-pipx works around this for me.

acid-bong commented 1 year ago

Looks like it's supposed to do so. I mean, there's an unbuilt wheel in cache, but after all pipx is installed an working. It's a bootstrapping tool, it doesn't have to remain on the system for pipx to work