puiterwijk / flask-oidc

OpenID Connect support for Flask
BSD 2-Clause "Simplified" License
157 stars 219 forks source link

Unable to install flask-oidc version 1.4.0 on WSL #133

Closed 0x7d7b closed 3 years ago

0x7d7b commented 3 years ago

When installing flask-oidc version 1.4.0 on WSL I get the following error. Python: 3.9.7 Pip: 21.3.1 WSL: Linux myHost 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 GNU/Linux

pip install flask-oidc==1.4.0
Collecting flask-oidc==1.4.0
  Using cached flask-oidc-1.4.0.tar.gz (30 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/me/.pyenv/versions/3.9.7/envs/flask-heroku/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-q6ccsqrd/flask-oidc_08fbe62099e24811ab9b172fe3b0800c/setup.py'"'"'; __file__='"'"'/tmp/pip-install-q6ccsqrd/flask-oidc_08fbe62099e24811ab9b172fe3b0800c/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-e9s1i2h1
       cwd: /tmp/pip-install-q6ccsqrd/flask-oidc_08fbe62099e24811ab9b172fe3b0800c/
  Complete output (13 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/home/me/.pyenv/versions/3.9.7/envs/flask-heroku/lib/python3.9/site-packages/setuptools/__init__.py", line 19, in <module>
      from setuptools.dist import Distribution
    File "/home/me/.pyenv/versions/3.9.7/envs/flask-heroku/lib/python3.9/site-packages/_virtualenv.py", line 89, in exec_module
      old(module)
    File "/home/me/.pyenv/versions/3.9.7/envs/flask-heroku/lib/python3.9/site-packages/setuptools/dist.py", line 38, in <module>
      from setuptools import windows_support
    File "/home/me/.pyenv/versions/3.9.7/envs/flask-heroku/lib/python3.9/site-packages/setuptools/windows_support.py", line 2, in <module>
      import ctypes
    File "/home/me/.pyenv/versions/3.9.7/lib/python3.9/ctypes/__init__.py", line 8, in <module>
      from _ctypes import Union, Structure, Array
  ModuleNotFoundError: No module named '_ctypes'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/9a/de/402709ab3e67b2f52a552b4aaab66a051fec4c544d9cf0a88532f97c1634/flask-oidc-1.4.0.tar.gz#sha256=0c12151139d47a562e1c5ae203fb9dbc759fe7474cc01e0238bef828ece58f4e (from https://pypi.org/simple/flask-oidc/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement flask-oidc==1.4.0 (from versions: 0.1.0, 0.1.1, 0.1.2, 1.0.0, 1.0.1, 1.0.3, 1.0.4, 1.1.0, 1.1.1, 1.3.0, 1.4.0)
ERROR: No matching distribution found for flask-oidc==1.4.0
0x7d7b commented 3 years ago

Ok, I finally solved it. It's a known issue: https://bugs.python.org/issue31652 Installing libffi-dev plus re-installing Python solved it.