0

I have been trying to install web3 using pip3 for interacting with a blockchain. Previously, I was able to install some packages by pip3 without any problem. However this time it causes errors while building wheel for bitarray, cytoolz and lru-dict. I couldn't find any answer on this error and will be glad for any of your guidance.

pip3 -V
>pip 21.0.1 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)

Below, you can find the error message I get about building wheels.

Building wheels for collected packages: bitarray, cytoolz, lru-dict
  Building wheel for bitarray (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3uu2emp_/bitarray_fa2a602081324f969c6602763f62a63f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3uu2emp_/bitarray_fa2a602081324f969c6602763f62a63f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-rklc24xg
       cwd: /tmp/pip-install-3uu2emp_/bitarray_fa2a602081324f969c6602763f62a63f/
  Complete output (18 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/bitarray
  copying bitarray/__init__.py -> build/lib.linux-x86_64-3.6/bitarray
  copying bitarray/test_bitarray.py -> build/lib.linux-x86_64-3.6/bitarray
  copying bitarray/util.py -> build/lib.linux-x86_64-3.6/bitarray
  copying bitarray/test_util.py -> build/lib.linux-x86_64-3.6/bitarray
  running build_ext
  building 'bitarray._bitarray' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/bitarray
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c bitarray/_bitarray.c -o build/temp.linux-x86_64-3.6/bitarray/_bitarray.o
  bitarray/_bitarray.c:12:20: fatal error: Python.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for bitarray
  Running setup.py clean for bitarray
  Building wheel for cytoolz (setup.py) ... error
selubamih
  • 73
  • 2
  • 12
  • https://stackoverflow.com/search?q=%5Bpip%5D+fatal+error%3A+Python.h%3A+No+such+file+or+directory – phd Apr 21 '22 at 14:12

0 Answers0