InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[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

Open Dakuan opened this issue 2 years ago • 19 comments
trafficstars

Is there an existing issue for this?

  • [X] 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 avatar May 07 '23 08:05 Dakuan

I fixed this by upgrading OSX from 13.0 -> 13.1

Dakuan avatar May 07 '23 09:05 Dakuan

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

xuhongfei avatar May 08 '23 02:05 xuhongfei

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

Akanta21 avatar May 08 '23 03:05 Akanta21

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

imggion avatar May 08 '23 09:05 imggion

I get this error after downgrading urllib3==1.26.6

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

billygrahamram avatar May 09 '23 03:05 billygrahamram

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

xuhongfei avatar May 09 '23 05:05 xuhongfei

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.

robotica-labs avatar May 09 '23 20:05 robotica-labs

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.

billygrahamram avatar May 09 '23 22:05 billygrahamram

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

mr0303 avatar May 10 '23 02:05 mr0303

Thanks. I did resolve using this same.

ajay2929 avatar May 10 '23 15:05 ajay2929

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

Thanks mr0303. This worked!

billygrahamram avatar May 11 '23 13:05 billygrahamram

Same problem OS version: 13.3.1

Etlay avatar May 20 '23 21:05 Etlay

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

Same change with the ImportError after down grading.

TheMellyBee avatar May 25 '23 19:05 TheMellyBee

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

Mont9165 avatar May 26 '23 04:05 Mont9165

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

lehigh123 avatar May 26 '23 19:05 lehigh123

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.

hobyvh avatar Jun 01 '23 19:06 hobyvh

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!

bcapps1259 avatar Jun 02 '23 01:06 bcapps1259

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: https://github.com/urllib3/urllib3/issues/2168 "

Cocii avatar Jun 03 '23 13:06 Cocii

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 :(

NebularNerd avatar Jun 13 '23 14:06 NebularNerd

I fixed this by upgrading OSX from 13.0 -> 13.1

How do I do that ?

prasaddd77 avatar Oct 16 '23 17:10 prasaddd77