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

[bug]: ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: https://github.com/urllib3/urllib3/issues/2168 #3358

Closed
1 task done
Dakuan opened this issue May 7, 2023 · 20 comments
Labels
bug Something isn't working

Comments

@Dakuan
Copy link

Dakuan commented May 7, 2023

Is there an existing issue for this?

  • I have searched the existing issues

OS

macOS

GPU

cuda

VRAM

No response

What version did you experience this issue on?

latest

What happened?

attempted install, failed:

Installing collected packages: urllib3, numpy, requests
  Attempting uninstall: urllib3
    Found existing installation: urllib3 2.0.2
    Uninstalling urllib3-2.0.2:
      Successfully uninstalled urllib3-2.0.2
  Attempting uninstall: numpy
    Found existing installation: numpy 1.24.3
    Uninstalling numpy-1.24.3:
      Successfully uninstalled numpy-1.24.3
  Attempting uninstall: requests
    Found existing installation: requests 2.30.0
    Uninstalling requests-2.30.0:
      Successfully uninstalled requests-2.30.0
Successfully installed numpy-1.23.5 requests-2.28.2 urllib3-1.26.15
Traceback (most recent call last):
  File "/Users/dominicbarker/Downloads/InvokeAI-Installer/./lib/main.py", line 50, in <module>
    inst.install(**args.__dict__)
  File "/Users/dominicbarker/Downloads/InvokeAI-Installer/lib/installer.py", line 189, in install
    self.instance.configure()
  File "/Users/dominicbarker/Downloads/InvokeAI-Installer/lib/installer.py", line 344, in configure
    import requests  # to catch download exceptions
  File "/private/var/folders/6r/dstg2nwd4_zdl6xldn4k4k0r0000gn/T/invokeai-installer-tmp0qvmyfks/lib/python3.9/site-packages/requests/__init__.py", line 43, in <module>
    import urllib3
  File "/private/var/folders/6r/dstg2nwd4_zdl6xldn4k4k0r0000gn/T/invokeai-installer-tmp0qvmyfks/lib/python3.9/site-packages/urllib3/__init__.py", line 38, in <module>
    raise ImportError(
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3```

### Screenshots

_No response_

### Additional context

_No response_

### Contact Details

_No response_
@Dakuan Dakuan added the bug Something isn't working label May 7, 2023
@Dakuan
Copy link
Author

Dakuan commented May 7, 2023

I fixed this by upgrading OSX from 13.0 -> 13.1

@xuhongfei
Copy link

My OSX version is 13.3.1(a). And I have the same issue. Does anyone have approach to resolve this?

@Akanta21
Copy link

Akanta21 commented May 8, 2023

Not sure if this would work for you.

I resolved it using this method in the interim by lowering the urllib3 requirement:

pip install urllib3==1.26.6

@gdjohn4s
Copy link

gdjohn4s commented May 8, 2023

@Akanta21 I resolved this issue in the same way.
Thanks!

@billygrahamram
Copy link

I get this error after downgrading urllib3==1.26.6

cannot import name 'get_host' from 'urllib3.util.url'

@xuhongfei
Copy link

My OSX version is 13.3.1(a). And I have the same issue. Does anyone have approach to resolve this?

Thanks @Akanta21 . This worked for me:
pip install urllib3==1.26.6

@robotica-labs
Copy link

robotica-labs commented May 9, 2023

Same error 13.3.1 (a) (22E772610a) I will try lowering urllib3

pip install urllib3==1.26.6
Requirement already satisfied: urllib3==1.26.6 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (1.26.6)
It did not work for me.
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl'\n module is compiled with LibreSSL 2.8.3.

@billygrahamram
Copy link

billygrahamram commented May 9, 2023

at first, the error I get is
cannot import name 'get_host' from 'urllib3.util.url'

Then once I downgrade urllib3
pip install urllib3==1.26.6

I get this error
ImportError: cannot import name 'get_host' from 'urllib3.util.url'

I tested the code in a Ubuntu system and it works perfectly. The problem is in the Macbook.

@mr0303
Copy link

mr0303 commented May 10, 2023

pip uninstall urllib3
pip install 'urllib3<2.0'
the above worked for me

@ajay2929
Copy link

Thanks. I did resolve using this same.

@billygrahamram
Copy link

pip uninstall urllib3 pip install 'urllib3<2.0' the above worked for me

Thanks mr0303. This worked!

@Etlay
Copy link

Etlay commented May 20, 2023

Same problem
OS version: 13.3.1

@TheMellyBee
Copy link

I'm still having the issue with OS version: 13.3.1

Same change with the ImportError after down grading.

@Mont9165
Copy link

Same error happened OS version: 13.3.1.
Thanks @mr0303 !! I resolved this error in the same way.

@lehigh123
Copy link

I'm still having the issue with OS version: 13.3.1. Tried all solutions above and none worked

@hobyvh
Copy link

hobyvh commented Jun 1, 2023

Same for me, the install won't complete at that error even after I use "pip install 'urllib3<2.0'" and I'm using 13.3.1 as well. The "uninstall urllib3" command didn't apply since it wasn't installed.

@bcapps1259
Copy link

After struggling to get this running on my new Mac Mini M2 with Ventura 13.4, here is my solution:

  1. Start installer, but do not continue. This creates a set of temporary install folders.

  2. Navigate to the folder below:
    /private/var/folders/3z/tl94bhbd0sl5gzlj29__6jwm0000gn/T/invokeai-installer-tmppc1li4ec/lib/python3.9/site-packages

  3. Delete two urllib3 folders.

  4. Continue with installation.

It worked for me, and I hope that it works for you too!

@Cocii
Copy link

Cocii commented Jun 3, 2023

THX!!! But for me, the path is "/private/var/folders/ms/l2jgzvsj1xvgz_b45r423kg00000gn/T/invokeai-installer-tmpg98rn5aj/lib/python3.9/site-packages"

the path will appear at the error
"
import urllib3
File "/private/var/folders/ms/l2jgzvsj1xvgz_b45r423kg00000gn/T/invokeai-installer-tmpg98rn5aj/lib/python3.9/site-packages/urllib3/init.py", line 38, in
raise ImportError(
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3. See: urllib3/urllib3#2168
"

@NebularNerd
Copy link

pip uninstall urllib3
pip install 'urllib3<2.0'

Thanks @mr0303, I'm testing a Python script on a crusty GoDaddy hosted server, this did the trick for me as they do not offer 3.1x versions in cPanel yet :(

@prasaddd77
Copy link

I fixed this by upgrading OSX from 13.0 -> 13.1

How do I do that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests