sigmavirus24 / github3.py

Hi, I'm a library for interacting with GItHub's REST API in a convenient and ergonomic way. I work on Python 3.6+.
https://github3.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.21k stars 402 forks source link

[Python 3.10.5] ImportError: DLL load failed while importing _rust #1106

Closed mxrch closed 2 years ago

mxrch commented 2 years ago

Hi ! When using github3.py with Python 3.10.5 on Windows 11, I get the following traceback :

>>> import github3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\github3\__init__.py", line 20, in <module>
    from .api import enterprise_login
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\github3\api.py", line 9, in <module>
    from .github import GitHub
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\github3\github.py", line 8, in <module>
    from . import apps
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\github3\apps.py", line 7, in <module>
    import jwt
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\jwt\__init__.py", line 1, in <module>
    from .api_jwk import PyJWK, PyJWKSet
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\jwt\api_jwk.py", line 3, in <module>
    from .algorithms import get_default_algorithms
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\jwt\algorithms.py", line 6, in <module>
    from .utils import (
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\jwt\utils.py", line 7, in <module>
    from cryptography.hazmat.primitives.asymmetric.ec import EllipticCurve
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptography\hazmat\primitives\asymmetric\ec.py", line 11, in <module>
    from cryptography.hazmat._oid import ObjectIdentifier
  File "C:\Users\thher\AppData\Local\Programs\Python\Python310\lib\site-packages\cryptography\hazmat\_oid.py", line 7, in <module>
    from cryptography.hazmat.bindings._rust import (
ImportError: DLL load failed while importing _rust: The specified module could not be found.

Python has been installed from the official website, not Microsoft Store (ref: https://stackoverflow.com/questions/73411542/failed-install-scrapy-importerror).

sigmavirus24 commented 2 years ago

A library we depend on had a dependency with a problem. This isn't a bug we can fix. I would look at cryptography's FAQ/docs to see if there's guidance for fixing this. I was under the impression they shipped wheels for windows though so I don't know why you're running into this.

Please don't open a bug in their project before searching their issue tracker first. Also if you do, please include way more information (versions of installed package relevant to them, etc) because this report gives me very little information to help you with as it is. There's a reason we have a template that asks for specific information