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

Setup doesn't work for host with Python 3.12.3 #138

Open
rafauke opened this issue Jun 18, 2024 · 4 comments
Open

Setup doesn't work for host with Python 3.12.3 #138

rafauke opened this issue Jun 18, 2024 · 4 comments

Comments

@rafauke
Copy link

rafauke commented Jun 18, 2024

Hello, thanks for the package :)

Unfortunately, there are some issues when installing:

$ curl -OL https://bashhub.com/setup && $SHELL setup
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  8717  100  8717    0     0  16059      0 --:--:-- --:--:-- --:--:-- 16083

Sorry can't seem to find a version of python 3.6-3.11 or 2.7.9+ installed

Version of python reported by os:

$ python --version
Python 3.12.3

Let me know if I can help with anything.

@rcaloras
Copy link
Owner

@rafauke thanks for opening. You can test fixing locally via one character change in the setup script:

if (3, 6, 0) < sys.version_info < (3, 12, 0):

Try changing the 12 to 13 and see if everything installs fine. If alls good would welcome a PR!

@bogorad
Copy link

bogorad commented Aug 12, 2024

alas. fedora-40. changed 12 to 13:

 $SHELL setup
Using Python path /usr/bin/python3
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 10.7M  100 10.7M    0     0  5810k      0  0:00:01  0:00:01 --:--:-- 6747k
Pulling down bashhub-client from 2.4.1 branch
Pulling down a few dependencies...(this may take a moment)
Traceback (most recent call last):
  File "/home/chuck/.bashhub/bashhub-client-2.4.1/../env/bin/pip", line 5, in <module>
    from pip._internal.cli.main import main
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_internal/cli/main.py", line 9, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_internal/cli/autocompletion.py", line 10, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_internal/cli/main_parser.py", line 8, in <module>
    from pip._internal.cli import cmdoptions
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_internal/cli/cmdoptions.py", line 23, in <module>
    from pip._internal.cli.parser import ConfigOptionParser
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_internal/cli/parser.py", line 12, in <module>
    from pip._internal.configuration import Configuration, ConfigurationError
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_internal/configuration.py", line 20, in <module>
    from pip._internal.exceptions import (
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_internal/exceptions.py", line 7, in <module>
    from pip._vendor.pkg_resources import Distribution
  File "/home/chuck/.bashhub/env/lib/python3.12/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2164, in <module>
    register_finder(pkgutil.ImpImporter, find_on_path)
                    ^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?

@rsmoorthy
Copy link

+1. I am also getting the above python error on ubuntu 24.04

@rsmoorthy
Copy link

I got this working, based on SO post that says you need to upgrade pip. (The current setup downloads a virtualenv pre-packaged, that may not work best for python 3.12. Either the virtualenv pre-packaged download should be made to work for python 3.12 or it may be best to create the virtual env from scratch).

After solving that problem, I ran into another one. The requests package 2.23 version is mentioned in setup.py, while that version does not work well with python 3.12, and I tried with the latest and it works fine. I have fixed this too in the following fix.

I have raised a PR #139

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