phuang / wallet-core-python

Wallet-core python binding
GNU General Public License v3.0
26 stars 12 forks source link

I'm getting an error when using: python3.8 setup.py build #8

Closed HK-Mattew closed 2 years ago

HK-Mattew commented 2 years ago

Note: Execution of ./bootstrap.sh was all successful.

Output:

root@localhost:~/wallet-core-python# python3.8 setup.py build
running build
running build_ext
building 'walletcore' extension
clang -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -Iwallet-core/include -Isrc -I/usr/include/python3.8 -c src/AnySigner.cc -o build/temp.linux-x86_64-3.8/src/AnySigner.o -std=c++17
In file included from src/AnySigner.cc:17:
src/AnySigner.h:20:10: fatal error: 'Python.h' file not found
#include <Python.h>
         ^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
root@localhost:~/wallet-core-python# 
phuang commented 2 years ago

Looks like Python headers are not installed. Please try sudo apt install python3-dev, if you are using ubuntu or debian. I guess fedora should be yum install python-devel

HK-Mattew commented 2 years ago

Perfect, it worked.

As I'm using python3.8, I just had to change sudo apt install python3-dev to sudo apt install python3.8-dev

Thank you very much ;)