How To Install python3-nest-asyncio on Fedora 36

In this tutorial we learn how to install python3-nest-asyncio in Fedora 36. python3-nest-asyncio is Patch asyncio to allow nested event loops

Introduction

In this tutorial we learn how to install python3-nest-asyncio on Fedora 36.

What is python3-nest-asyncio

By design asyncio does not allow its event loop to be nested. This presents a practical problem where the event loop is already running it’s impossible to run tasks and wait for the result. Trying to do so will give the error “RuntimeError The issue pops up in various environments, such as web servers, GUI applications and in Jupyter notebooks. This module patches asyncio to allow nested use of asyncio.run and loop.run_until_complete.

We can use yum or dnf to install python3-nest-asyncio on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install python3-nest-asyncio.

Install python3-nest-asyncio on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install python3-nest-asyncio using dnf by running the following command:

sudo dnf -y install python3-nest-asyncio

Install python3-nest-asyncio on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install python3-nest-asyncio using yum by running the following command:

sudo yum -y install python3-nest-asyncio

How To Uninstall python3-nest-asyncio on Fedora 36

To uninstall only the python3-nest-asyncio package we can use the following command:

sudo dnf remove python3-nest-asyncio

python3-nest-asyncio Package Contents on Fedora 36

/usr/lib/python3.10/site-packages/__pycache__/nest_asyncio.cpython-310.opt-1.pyc
/usr/lib/python3.10/site-packages/__pycache__/nest_asyncio.cpython-310.pyc
/usr/lib/python3.10/site-packages/nest_asyncio-1.5.4.dist-info
/usr/lib/python3.10/site-packages/nest_asyncio-1.5.4.dist-info/INSTALLER
/usr/lib/python3.10/site-packages/nest_asyncio-1.5.4.dist-info/LICENSE
/usr/lib/python3.10/site-packages/nest_asyncio-1.5.4.dist-info/METADATA
/usr/lib/python3.10/site-packages/nest_asyncio-1.5.4.dist-info/WHEEL
/usr/lib/python3.10/site-packages/nest_asyncio-1.5.4.dist-info/top_level.txt
/usr/lib/python3.10/site-packages/nest_asyncio.py
/usr/share/doc/python3-nest-asyncio
/usr/share/doc/python3-nest-asyncio/README.rst

References

Summary

In this tutorial we learn how to install python3-nest-asyncio on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).