Error using Python 3.10.0 and cffi 1.14.6

3,016 views
Skip to first unread message

Padmahas Bn

unread,
Oct 8, 2021, 9:00:44 AM10/8/21
to python-cffi
Hello,

While installing dependencies using requirements.txt on Python 3.10.0 version, I'm getting below error for cffi 1.14.6 version as well as 1.14.4 version.

Collecting cffi==1.14.6
  Using cached cffi-1.14.6.tar.gz (475 kB)
    ERROR: Command errored out with exit status 1:
     command: 'e:\pycharm_workspace\marketing-portal-master@e25f0b9ff0d\venv\scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\
Users\\padmahasa.narayana\\AppData\\Local\\Temp\\pip-install-7ccdv5y7\\cffi_dafeed274af94a519a79f9959ef33c13\\setup.py'"'"'; __file__='"'"'C:\\Users\\padmahasa.naraya
na\\AppData\\Local\\Temp\\pip-install-7ccdv5y7\\cffi_dafeed274af94a519a79f9959ef33c13\\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 'C:\Users\padmahasa.narayana\AppData\Local\Temp\pip-pip-egg-info-h7od9_a3'
         cwd: C:\Users\padmahasa.narayana\AppData\Local\Temp\pip-install-7ccdv5y7\cffi_dafeed274af94a519a79f9959ef33c13\
    Complete output (19 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\padmahasa.narayana\AppData\Local\Temp\pip-install-7ccdv5y7\cffi_dafeed274af94a519a79f9959ef33c13\setup.py", line 127, in <module>
        if sys.platform == 'win32' and uses_msvc():
      File "C:\Users\padmahasa.narayana\AppData\Local\Temp\pip-install-7ccdv5y7\cffi_dafeed274af94a519a79f9959ef33c13\setup.py", line 105, in uses_msvc
        return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')
      File "C:\Users\padmahasa.narayana\AppData\Local\Programs\Python\Python310\lib\distutils\command\config.py", line 225, in try_compile
        self._compile(body, headers, include_dirs, lang)
      File "C:\Users\padmahasa.narayana\AppData\Local\Programs\Python\Python310\lib\distutils\command\config.py", line 132, in _compile
        self.compiler.compile([src], include_dirs=include_dirs)
      File "C:\Users\padmahasa.narayana\AppData\Local\Programs\Python\Python310\lib\distutils\_msvccompiler.py", line 323, in compile
        self.initialize()
      File "C:\Users\padmahasa.narayana\AppData\Local\Programs\Python\Python310\lib\distutils\_msvccompiler.py", line 220, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "e:\pycharm_workspace\marketing-portal-master@e25f0b9ff0d\venv\lib\site-packages\setuptools\msvc.py", line 316, in msvc14_get_vc_env
        return _msvc14_get_vc_env(plat_spec)
      File "e:\pycharm_workspace\marketing-portal-master@e25f0b9ff0d\venv\lib\site-packages\setuptools\msvc.py", line 270, in _msvc14_get_vc_env
        raise distutils.errors.DistutilsPlatformError(
    distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft
.com/visual-cpp-build-tools/
    ----------------------------------------
32887784274dd533c57909b7b1dcadcc128a2ac21331a9765dd (from https://pypi.org/simple/cffi/). Command errored out with exit status 1: python setup.py egg_info Check the l
ogs for full command output.
ERROR: Could not find a version that satisfies the requirement cffi==1.14.6 (from versions: 0.1, 0.2, 0.2.1, 0.3, 0.4, 0.4.1, 0.4.2, 0.5, 0.6, 0.7, 0.7.1, 0.7.2, 0.8,
 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.8.5, 0.8.6, 0.9.0, 0.9.1, 0.9.2, 1.0.0, 1.0.1, 1.0.2.post2, 1.0.3, 1.1.0, 1.1.1, 1.1.2, 1.2.0.post1, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1,
 1.4.2, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.7.0, 1.8.2, 1.8.3, 1.9.0, 1.9.1, 1.10.0, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.11.4, 1.11.5, 1.12.0, 1.12.1, 1.12.2, 1.12.3, 1.13.0,
 1.13.1, 1.13.2, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2)
ERROR: No matching distribution found for cffi==1.14.6

Armin Rigo

unread,
Oct 9, 2021, 7:59:58 AM10/9/21
to pytho...@googlegroups.com
Hi, 

CFFI will release wheels for the very new CPython 3.10 soon. In the meantime, you need to use CPython 3.9 or install compilers on your machine. 

Armin 

--
-- python-cffi: To unsubscribe from this group, send email to python-cffi...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/python-cffi?hl=en
---
You received this message because you are subscribed to the Google Groups "python-cffi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python-cffi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python-cffi/1f752944-18b6-4214-aff9-34e725a65c0fn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages