`pip install esmre` not work. Ubuntu 20.04, Python3.8.10
Closed this issue · 2 comments
HarryWu99 commented
Hi, I run pip install esmre
, and I get error.
How to install it?
Looking in indexes: http://mirrors.tencentyun.com/pypi/simple
Collecting esmre
Downloading http://mirrors.tencentyun.com/pypi/packages/b2/e6/d5faf9881a91bda0ae85b210df399d19a74babf3f53edbf653b454cb93fe/esmre-1.0.tar.gz (56 kB)
|████████████████████████████████| 56 kB 585 kB/s
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from esmre) (45.2.0)
Building wheels for collected packages: esmre
Building wheel for esmre (PEP 517) ... error
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 /tmp/tmpk6vezx68 build_wheel /tmp/tmpm6lyks41
cwd: /tmp/pip-install-tzdd5nc5/esmre
Complete output (19 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
copying src/esmre.py -> build/lib.linux-x86_64-cpython-38
running build_ext
building 'esm' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/src
creating build/temp.linux-x86_64-cpython-38/src/esm
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 -fPIC -I/usr/include/python3.8 -c src/esm.c -o build/temp.linux-x86_64-cpython-38/src/esm.o
src/esm.c:20:10: fatal error: Python.h: No such file or directory
20 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
/tmp/pip-build-env-bs75wjag/overlay/lib/python3.8/site-packages/setuptools/dist.py:770: UserWarning: Usage of dash-separated 'index-url' will not be supported in future versions. Please use the underscore name 'index_url' instead
warnings.warn(
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------
ERROR: Failed building wheel for esmre
Failed to build esmre
ERROR: Could not build wheels for esmre which use PEP 517 and cannot be installed directly
HarryWu99 commented
sudo apt install python-dev
work for me.
wharris commented
Closed as @HarryWu-CHN solved the problem.