gusutabopb / aioinflux

Asynchronous Python client for InfluxDB
MIT License
159 stars 31 forks source link

problem during pip install #40

Closed agn-7 closed 2 years ago

agn-7 commented 2 years ago

Recently I have a problem with installing the aioinflux PyPI package using pip:

pip install aioinflux==0.9.0

Here's what I get back:

Collecting aioinflux==0.9.0
  Using cached aioinflux-0.9.0-py3-none-any.whl (16 kB)

Collecting aiohttp>=3.0
  Using cached aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB)
Collecting ciso8601
  Using cached ciso8601-2.1.3.tar.gz (15 kB)
Requirement already satisfied: async-timeout<4.0,>=3.0 in ./env/lib/python3.9/site-packages (from aiohttp>=3.0->aioinflux==0.9.0) (3.0.1)
Requirement already satisfied: multidict<7.0,>=4.5 in ./env/lib/python3.9/site-packages (from aiohttp>=3.0->aioinflux==0.9.0) (5.1.0)
Requirement already satisfied: yarl<2.0,>=1.0 in ./env/lib/python3.9/site-packages (from aiohttp>=3.0->aioinflux==0.9.0) (1.6.3)
Requirement already satisfied: typing-extensions>=3.6.5 in ./env/lib/python3.9/site-packages (from aiohttp>=3.0->aioinflux==0.9.0) (3.10.0.0)
Requirement already satisfied: chardet<5.0,>=2.0 in ./env/lib/python3.9/site-packages (from aiohttp>=3.0->aioinflux==0.9.0) (4.0.0)
Requirement already satisfied: attrs>=17.3.0 in ./env/lib/python3.9/site-packages (from aiohttp>=3.0->aioinflux==0.9.0) (21.2.0)
Requirement already satisfied: idna>=2.0 in ./env/lib/python3.9/site-packages (from yarl<2.0,>=1.0->aiohttp>=3.0->aioinflux==0.9.0) (2.10)
Building wheels for collected packages: ciso8601
  Building wheel for ciso8601 (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/benyamin/PycharmProjects/ivms/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/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'"'"'))' bdist_wheel -d /tmp/pip-wheel-6nn7ilbn
       cwd: /tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/
  Complete output (18 lines):
  running bdist_wheel
  running build
  running build_py
  package init file 'ciso8601/__init__.py' not found (or not a regular file)
  creating build
  creating build/lib.linux-x86_64-3.9
  creating build/lib.linux-x86_64-3.9/ciso8601
  copying ciso8601/__init__.pyi -> build/lib.linux-x86_64-3.9/ciso8601
  copying ciso8601/py.typed -> build/lib.linux-x86_64-3.9/ciso8601
  running build_ext
  building 'ciso8601' extension
  creating build/temp.linux-x86_64-3.9
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DCISO8601_VERSION=2.1.3 -I/home/benyamin/PycharmProjects/ivms/env/include -I/usr/include/python3.9 -c module.c -o build/temp.linux-x86_64-3.9/module.o
  module.c:1:10: fatal error: Python.h: No such file or directory
      1 | #include <Python.h>
        |          ^~~~~~~~~~
  compilation terminated.
  error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for ciso8601
  Running setup.py clean for ciso8601
Failed to build ciso8601
Installing collected packages: ciso8601, aiohttp, aioinflux
    Running setup.py install for ciso8601 ... error
    ERROR: Command errored out with exit status 1:
     command: /home/benyamin/PycharmProjects/ivms/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/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'"'"'))' install --record /tmp/pip-record-w9l_7mmo/install-record.txt --single-version-externally-managed --compile --install-headers /home/benyamin/PycharmProjects/ivms/env/include/site/python3.9/ciso8601
         cwd: /tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/
    Complete output (18 lines):
    running install
    running build
    running build_py
    package init file 'ciso8601/__init__.py' not found (or not a regular file)
    creating build
    creating build/lib.linux-x86_64-3.9
    creating build/lib.linux-x86_64-3.9/ciso8601
    copying ciso8601/__init__.pyi -> build/lib.linux-x86_64-3.9/ciso8601
    copying ciso8601/py.typed -> build/lib.linux-x86_64-3.9/ciso8601
    running build_ext
    building 'ciso8601' extension
    creating build/temp.linux-x86_64-3.9
    x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DCISO8601_VERSION=2.1.3 -I/home/benyamin/PycharmProjects/ivms/env/include -I/usr/include/python3.9 -c module.c -o build/temp.linux-x86_64-3.9/module.o
    module.c:1:10: fatal error: Python.h: No such file or directory
        1 | #include <Python.h>
          |          ^~~~~~~~~~
    compilation terminated.
    error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/benyamin/PycharmProjects/ivms/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-6vlfria8/ciso8601_eb27a37138244a729c0bbd6b5fd97f7a/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'"'"'))' install --record /tmp/pip-record-w9l_7mmo/install-record.txt --single-version-externally-managed --compile --install-headers /home/benyamin/PycharmProjects/ivms/env/include/site/python3.9/ciso8601 Check the logs for full command output.

[NOTE]:

agn-7 commented 2 years ago

The problem has been resolved by the following package installation:

sudo apt-get install python3.9-dev

My bad!