Проблема с запуском телеграм бота при обновлении Fedora 36 на Fedora 37

Проблема заключается в следующем.

После обновления дистрибутива Fedora. Перестал запускаться бот из терминала, но при этом из PyCharm запускался без проблем. Решив что проблема с кривым обновлением, снес Fedora 37 и заново установил. Теперь не запускается даже из PyCharm. Лог ошибок прикладываю

(venv) [lcn@fedora Wash_And_Go_bot]$ python main.py
Traceback (most recent call last):
  File "/home/lcn/PycharmProjects/Practice programming on Python/telegram_bot/Wash_And_Go_bot/main.py", line 5, in <module>
    from aiogram import Bot, Dispatcher
ModuleNotFoundError: No module named 'aiogram'

После попытки установить aiogram, через pip install aiogram, выходят новые ошибки, так же лог прикладываю.

(venv) [lcn@fedora Wash_And_Go_bot]$ pip install aiogram
Defaulting to user installation because normal site-packages is not writeable
Collecting aiogram
  Using cached aiogram-2.23.1-py3-none-any.whl (199 kB)
Collecting aiohttp<3.9.0,>=3.8.0
  Using cached aiohttp-3.8.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB)
Collecting Babel<2.10.0,>=2.9.1
  Using cached Babel-2.9.1-py2.py3-none-any.whl (8.8 MB)
Collecting certifi>=2021.10.8
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Collecting magic-filter>=1.0.9
  Using cached magic_filter-1.0.9-py3-none-any.whl (9.3 kB)
Requirement already satisfied: attrs>=17.3.0 in /home/lcn/.local/lib/python3.11/site-packages (from aiohttp<3.9.0,>=3.8.0->aiogram) (22.1.0)
Requirement already satisfied: charset-normalizer<3.0,>=2.0 in /usr/lib/python3.11/site-packages (from aiohttp<3.9.0,>=3.8.0->aiogram) (2.1.0)
Collecting multidict<7.0,>=4.5
  Using cached multidict-6.0.2.tar.gz (50 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting async-timeout<5.0,>=4.0.0a3
  Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting yarl<2.0,>=1.0
  Using cached yarl-1.8.1.tar.gz (172 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting frozenlist>=1.1.1
  Using cached frozenlist-1.3.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (154 kB)
Collecting aiosignal>=1.1.2
  Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Requirement already satisfied: pytz>=2015.7 in /usr/lib/python3.11/site-packages (from Babel<2.10.0,>=2.9.1->aiogram) (2022.6)
Requirement already satisfied: idna>=2.0 in /usr/lib/python3.11/site-packages (from yarl<2.0,>=1.0->aiohttp<3.9.0,>=3.8.0->aiogram) (3.3)
Building wheels for collected packages: multidict, yarl
  Building wheel for multidict (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for multidict (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [66 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/multidict
      copying multidict/_multidict_py.py -> build/lib.linux-x86_64-cpython-311/multidict
      copying multidict/_multidict_base.py -> build/lib.linux-x86_64-cpython-311/multidict
      copying multidict/_compat.py -> build/lib.linux-x86_64-cpython-311/multidict
      copying multidict/_abc.py -> build/lib.linux-x86_64-cpython-311/multidict
      copying multidict/__init__.py -> build/lib.linux-x86_64-cpython-311/multidict
      running egg_info
      writing multidict.egg-info/PKG-INFO
      writing dependency_links to multidict.egg-info/dependency_links.txt
      writing top-level names to multidict.egg-info/top_level.txt
      reading manifest file 'multidict.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files found matching 'multidict/_multidict.html'
      warning: no previously-included files found matching 'multidict/*.so'
      warning: no previously-included files found matching 'multidict/*.pyd'
      warning: no previously-included files found matching 'multidict/*.pyd'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE'
      writing manifest file 'multidict.egg-info/SOURCES.txt'
      /usr/lib/python3.11/site-packages/setuptools/command/build_py.py:153: SetuptoolsDeprecationWarning:     Installing 'multidict._multilib' as data is deprecated, please list it in `packages`.
          !!
      
      
          ############################
          # Package would be ignored #
          ############################
          Python recognizes 'multidict._multilib' as an importable package,
          but it is not listed in the `packages` configuration of setuptools.
      
          'multidict._multilib' has been automatically added to the distribution only
          because it may contain data files, but this behavior is likely to change
          in future versions of setuptools (and therefore is considered deprecated).
      
          Please make sure that 'multidict._multilib' is included as a package by using
          the `packages` configuration field or the proper discovery methods
          (for example by using `find_namespace_packages(...)`/`find_namespace:`
          instead of `find_packages(...)`/`find:`).
      
          You can read more about "package discovery" and "data files" on setuptools
          documentation page.
      
      
      !!
      
        check.warn(importable)
      copying multidict/__init__.pyi -> build/lib.linux-x86_64-cpython-311/multidict
      copying multidict/py.typed -> build/lib.linux-x86_64-cpython-311/multidict
      running build_ext
      building 'multidict._multidict' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/multidict
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.11 -c multidict/_multidict.c -o build/temp.linux-x86_64-cpython-311/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic
      multidict/_multidict.c:1:10: фатальная ошибка: Python.h: Нет такого файла или каталога
          1 | #include "Python.h"
            |          ^~~~~~~~~~
      компиляция прервана.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for multidict
  Building wheel for yarl (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for yarl (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [44 lines of output]
      /usr/lib/python3.11/site-packages/setuptools/config/setupcfg.py:463: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
        warnings.warn(msg, warning_class)
      **********************
      * Accelerated build *
      **********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-311
      creating build/lib.linux-x86_64-cpython-311/yarl
      copying yarl/_url.py -> build/lib.linux-x86_64-cpython-311/yarl
      copying yarl/_quoting_py.py -> build/lib.linux-x86_64-cpython-311/yarl
      copying yarl/_quoting.py -> build/lib.linux-x86_64-cpython-311/yarl
      copying yarl/__init__.py -> build/lib.linux-x86_64-cpython-311/yarl
      running egg_info
      writing yarl.egg-info/PKG-INFO
      writing dependency_links to yarl.egg-info/dependency_links.txt
      writing requirements to yarl.egg-info/requires.txt
      writing top-level names to yarl.egg-info/top_level.txt
      reading manifest file 'yarl.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.cache' found anywhere in distribution
      warning: no previously-included files found matching 'yarl/*.html'
      warning: no previously-included files found matching 'yarl/*.so'
      warning: no previously-included files found matching 'yarl/*.pyd'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE'
      writing manifest file 'yarl.egg-info/SOURCES.txt'
      copying yarl/__init__.pyi -> build/lib.linux-x86_64-cpython-311/yarl
      copying yarl/_quoting_c.pyi -> build/lib.linux-x86_64-cpython-311/yarl
      copying yarl/_quoting_c.pyx -> build/lib.linux-x86_64-cpython-311/yarl
      copying yarl/py.typed -> build/lib.linux-x86_64-cpython-311/yarl
      running build_ext
      building 'yarl._quoting_c' extension
      creating build/temp.linux-x86_64-cpython-311
      creating build/temp.linux-x86_64-cpython-311/yarl
      gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.11 -c yarl/_quoting_c.c -o build/temp.linux-x86_64-cpython-311/yarl/_quoting_c.o
      yarl/_quoting_c.c:6:10: фатальная ошибка: Python.h: Нет такого файла или каталога
          6 | #include "Python.h"
            |          ^~~~~~~~~~
      компиляция прервана.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl, which is required to install pyproject.toml-based projects

Не могу сообразить в какой стороне искать проблему.

Есть подозрения на python 3.11, потому что до этого писал на 3.10


Ответы (1 шт):

Автор решения: LCN

Проблема решилась установкой файлов заголовка и статичных библиотек для python dev. Командой sudo dnf install python3-devel

→ Ссылка