You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何查看aiohttp版本?Ubuntu16.04下aiohttp版本查询问题

How to Check aiohttp Version

General Ways to Find aiohttp Version

No matter what operating system you're on, these methods will reliably get your installed aiohttp version:

  • Use the Python Interpreter:
    Open your terminal, type python (or python3 if you're working with Python 3) to enter the interactive shell, then run:

    import aiohttp
    print(aiohttp.__version__)
    

    This directly pulls the version number from the installed package in that Python environment.

  • Use pip:
    If you installed aiohttp via pip, filter your installed packages to find aiohttp:

    • For Python 2: pip list | grep aiohttp
    • For Python 3: pip3 list | grep aiohttp
      Or get detailed package info including version with pip show aiohttp (or pip3 show aiohttp).

Fixing the Ubuntu 16.04 "command not found" Issue

The error -bash: aiohttp: command not found is totally normal here—older versions of aiohttp don't include a command-line interface (CLI) tool, so running aiohttp -V won't work. Even newer versions might require extra setup for the CLI, so it's not a reliable way to check the version.

Since your system's default Python is 2.7.12, here's how to check the aiohttp version for that environment:

  1. Check with pip for Python 2:
    Run pip show aiohttp in your terminal. If aiohttp is installed, you'll see output like this:

    Name: aiohttp
    Version: 3.8.4
    Location: /usr/local/lib/python2.7/dist-packages
    Requires: async-timeout, attrs, chardet, multidict, yarl
    

    If you get "Package(s) not found", that means aiohttp isn't installed for Python 2.7.

  2. Check via Python 2 Shell:
    Launch Python 2 by typing python in your terminal, then run:

    import aiohttp
    print(aiohttp.__version__)
    

    If this throws an ImportError, aiohttp isn't installed in your Python 2 environment.

A quick note: Python 2 is no longer supported, so if you can, consider switching to Python 3. Install aiohttp for Python 3 with sudo pip3 install aiohttp, then check the version using pip3 show aiohttp or the Python 3 interpreter.

内容的提问来源于stack exchange,提问作者GoodtheBest

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 11:07:52