rcaloras/bashhub-client

Install now results in 'No matching distribution found for pyCLI==2.0.3'

proinsias opened this issue · 7 comments

I've been using bashhub for a while (Thanks! by the way), and had a reason to reinstall it.

Unfortunately, now I'm getting a weird error upon install:

> curl -OL https://bashhub.com/setup && bash setup
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8783  100  8783    0     0  39754      0 --:--:-- --:--:-- --:--:-- 41823
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122  100   122    0     0   1073      0 --:--:-- --:--:-- --:--:--  1184
100   282  100   282    0     0   1403      0 --:--:-- --:--:-- --:--:--  1403
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 5001k  100 5001k    0     0  3223k      0  0:00:01  0:00:01 --:--:-- 4368k
Using Python path /Users/ftod/.pyenv/shims/python3.8
Using base prefix '/Users/ftod/.pyenv/versions/3.8.2'
New python executable in /Users/ftod/.bashhub/env/bin/python3.8
Also creating executable in /Users/ftod/.bashhub/env/bin/python
Installing setuptools, pip, wheel...
done.
Pulling down bashhub-client from 2.1.3 branch
Pulling down a few dependencies...(this may take a moment)
  ERROR: Command errored out with exit status 1:
   command: /Users/ftod/.bashhub/env/bin/python3.8 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-install-8y2kkf8j/pycli_0eb3c03f54424b80bc0a337794a84c2e/setup.py'"'"'; __file__='"'"'/private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-install-8y2kkf8j/pycli_0eb3c03f54424b80bc0a337794a84c2e/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-pip-egg-info-uqgsh76g
       cwd: /private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-install-8y2kkf8j/pycli_0eb3c03f54424b80bc0a337794a84c2e/
  Complete output (36 lines):
  running egg_info
  creating /private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-pip-egg-info-uqgsh76g/pyCLI.egg-info
  writing /private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-pip-egg-info-uqgsh76g/pyCLI.egg-info/PKG-INFO
  writing dependency_links to /private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-pip-egg-info-uqgsh76g/pyCLI.egg-info/dependency_links.txt
  writing entry points to /private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-pip-egg-info-uqgsh76g/pyCLI.egg-info/entry_points.txt
  writing top-level names to /private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-pip-egg-info-uqgsh76g/pyCLI.egg-info/top_level.txt
  writing manifest file '/private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-pip-egg-info-uqgsh76g/pyCLI.egg-info/SOURCES.txt'
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/_c/s2n0864j077cpl86rfz3gbc80000gp/T/pip-install-8y2kkf8j/pycli_0eb3c03f54424b80bc0a337794a84c2e/setup.py", line 43, in <module>
      setup(**setup_options)
    File "/Users/ftod/.bashhub/env/lib/python3.8/site-packages/setuptools/__init__.py", line 159, in setup
      return distutils.core.setup(**attrs)
    File "/Users/ftod/.pyenv/versions/3.8.2/lib/python3.8/distutils/core.py", line 148, in setup
      dist.run_commands()
    File "/Users/ftod/.pyenv/versions/3.8.2/lib/python3.8/distutils/dist.py", line 966, in run_commands
      self.run_command(cmd)
    File "/Users/ftod/.pyenv/versions/3.8.2/lib/python3.8/distutils/dist.py", line 985, in run_command
      cmd_obj.run()
    File "/Users/ftod/.bashhub/env/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 299, in run
      self.find_sources()
    File "/Users/ftod/.bashhub/env/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 306, in find_sources
      mm.run()
    File "/Users/ftod/.bashhub/env/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 541, in run
      self.add_defaults()
    File "/Users/ftod/.bashhub/env/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 578, in add_defaults
      sdist.add_defaults(self)
    File "/Users/ftod/.pyenv/versions/3.8.2/lib/python3.8/distutils/command/sdist.py", line 226, in add_defaults
      self._add_defaults_python()
    File "/Users/ftod/.bashhub/env/lib/python3.8/site-packages/setuptools/command/sdist.py", line 113, in _add_defaults_python
      self._add_data_files(self._safe_data_files(build_py))
    File "/Users/ftod/.bashhub/env/lib/python3.8/site-packages/setuptools/command/egg_info.py", line 621, in _safe_data_files
      return build_py.get_data_files_without_manifest()
    File "/Users/ftod/.pyenv/versions/3.8.2/lib/python3.8/distutils/cmd.py", line 103, in __getattr__
      raise AttributeError(attr)
  AttributeError: get_data_files_without_manifest
  ----------------------------------------
ERROR: Could not find a version that satisfies the requirement pyCLI==2.0.3 (from bashhub) (from versions: devel, 0.2, 0.3.3, 0.3.4, 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.1.0, 1.1.1, 2.0.0, 2.0.1, 2.0.2, 2.0.3)
ERROR: No matching distribution found for pyCLI==2.0.3

What's weird to me is that it complains it can't find v2.0.3 from a list that includes v2.0.3!

Btw this is on a Mac running Monterey v12.0.1. And I tested on Big Sur as well. Same issue.

Hey @proinsias, thanks for opening! Were you able to resolve this?

Don't think I've seen this issue before. My first impression is perhaps related to the newer python version (3.8), but I'm personally running bashhub with Python 3.8.3 and believe several others are as well. This is on OS X, Bug Sur. I'd suggest to try another version if nothing else.

FWIW one upgrade I've wanted to do on the client is to remove pyCLI and move the bh cli to use click like the bashhub cli.

No, no luck resolving.
When I try curl -OL https://bashhub.com/setup && bash setup on Linux via docker (ubuntu & python 3.8) I get:

Using Python path /usr/bin/python3.8
Using base prefix '/usr'
New python executable in /home/data/.bashhub/env/bin/python3.8
Also creating executable in /home/data/.bashhub/env/bin/python
Installing setuptools, pip, wheel...
done.
Pulling down bashhub-client from 2.1.3 branch
Pulling down a few dependencies...(this may take a moment)
  ERROR: Command errored out with exit status 1:
   command: /home/data/.bashhub/env/bin/python3.8 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-c_zlfk92/pymongo_05b0c4c8b7e448308246b3dcd306cca3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-c_zlfk92/pymongo_05b0c4c8b7e448308246b3dcd306cca3/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-yjoi09_r
       cwd: /tmp/pip-install-c_zlfk92/pymongo_05b0c4c8b7e448308246b3dcd306cca3/
  Complete output (1 lines):
  error in pymongo setup command: use_2to3 is invalid.
  ----------------------------------------
ERROR: Could not find a version that satisfies the requirement pymongo==2.9 (from bashhub) (from versions: 0.1rc0, 0.1.1rc0, 0.1.2rc0, 0.2rc0, 0.3rc0, 0.3.1rc0, 0.4rc0, 0.5rc0, 0.5.1rc0, 0.5.2rc0, 0.5.3rc0, 0.6, 0.7, 0.7.1, 0.7.2, 0.8, 0.8.1, 0.9, 0.9.1, 0.9.2, 0.9.3, 0.9.4, 0.9.5, 0.9.6, 0.9.7, 0.10, 0.10.1, 0.10.2, 0.10.3, 0.11, 0.11.1, 0.11.2, 0.11.3, 0.12, 0.13, 0.14, 0.14.1, 0.14.2, 0.15, 0.15.1, 0.15.2, 0.16, 1.0, 1.1, 1.1.1, 1.1.2, 1.2, 1.2.1, 1.3, 1.4, 1.5, 1.5.1, 1.5.2, 1.6, 1.7, 1.8, 1.8.1, 1.9, 1.10, 1.10.1, 1.11, 2.0, 2.0.1, 2.1, 2.1.1, 2.2, 2.2.1, 2.3, 2.4, 2.4.1, 2.4.2, 2.5, 2.5.1, 2.5.2, 2.6, 2.6.1, 2.6.2, 2.6.3, 2.7, 2.7.1, 2.7.2, 2.8, 2.8.1, 2.9, 2.9.1, 2.9.2, 2.9.3, 2.9.4, 2.9.5, 3.0, 3.0.1, 3.0.2, 3.0.3, 3.1, 3.1.1, 3.2, 3.2.1, 3.2.2, 3.3.0, 3.3.1, 3.4.0, 3.5.0, 3.5.1, 3.6.0, 3.6.1, 3.7.0, 3.7.1, 3.7.2, 3.8.0, 3.9.0, 3.10.0, 3.10.1, 3.11.0, 3.11.1, 3.11.2, 3.11.3, 3.11.4, 3.12.0, 3.12.1)
ERROR: No matching distribution found for pymongo==2.9

With the above, I was using my fairly old pyenv python3.8 installation.
I just tried installing using a python3.8 installed via homebrew.

Now I'm getting:

Using Python path /usr/local/opt/python@3.8/bin/python3.8
Using base prefix '/usr/local/Cellar/python@3.8/3.8.12_1/Frameworks/Python.framework/Versions/3.8'
New python executable in /Users/ftod/.bashhub/env/bin/python3.8
Also creating executable in /Users/ftod/.bashhub/env/bin/python
ERROR: The executable /Users/ftod/.bashhub/env/bin/python3.8 is not functioning
ERROR: It thinks sys.prefix is '/usr/local/Cellar/python@3.8/3.8.12_1/Frameworks/Python.framework/Versions/3.8' (should be '/Users/ftod/.bashhub/env')
ERROR: virtualenv is not compatible with this system or executable

Doesn't seem to be #97. Maybe related to #95?

Hmm reading through. Still not sure. Feel it's probably time to update the virtualenv version being used, or better yet update bashhub's installation to not need it and be more standalone. This is a larger task though.

In the short term to get your install by, you can also try specifying a specific earlier version of Python you may have installed by editing the install script locally and prepend the command for 3.6 or maybe a 2.7 version you have installed. It's listed to try them in order of preference.

python_version_array=( "python3.8" "python3.7" "python3.6" "python3.5" "python3" "python" "python2.7" "python27" "python2")

I got Bashhub working by creating my own pyenv environment and installing via the git repo.

Glad you found a work around @proinsias! I'll start to consider more options for updating the client to avoid potential install problems going forward.