V13 Fresh Install Bare Metal

Has anyone faced this issue this morning , manual install of v13.
bare metal server ubuntu 20.04.

Getting erpnext
$ git clone GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP) --branch version-13 --depth 1 --origin upstream
Cloning into ‘erpnext’…
remote: Enumerating objects: 7286, done.
remote: Counting objects: 100% (7286/7286), done.
remote: Compressing objects: 100% (6206/6206), done.
remote: Total 7286 (delta 1848), reused 3083 (delta 790), pack-reused 0
Receiving objects: 100% (7286/7286), 18.39 MiB | 9.76 MiB/s, done.
Resolving deltas: 100% (1848/1848), done.
Updating files: 100% (6837/6837), done.

Installing erpnext
$ ./env/bin/python -m pip install -q -U -e ./apps/erpnext
ERROR: Command errored out with exit status 1:
command: /home/erpnxtadmin/frappe-bench/env/bin/python -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/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-uc9pi8q9
cwd: /tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/
Complete output (24 lines):
You are running without Cython installed. It is highly recommended to run
pip install cython>=0.29.21,<1.0.0
before you continue
/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/setuptools/init.py:151: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
SetuptoolsDeprecationWarning,
Warning: ‘classifiers’ should be a list, got type ‘tuple’
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/jsonobject
copying jsonobject/init.py → build/lib.linux-x86_64-3.7/jsonobject
copying jsonobject/exceptions.py → build/lib.linux-x86_64-3.7/jsonobject
running build_ext
building ‘jsonobject.api’ extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/jsonobject
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fdebug-prefix-map=/build/python3.7-w3mY2c/python3.7-3.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -g -fdebug-prefix-map=/build/python3.7-w3mY2c/python3.7-3.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/erpnxtadmin/frappe-bench/env/include -I/usr/include/python3.7m -c jsonobject/api.c -o build/temp.linux-x86_64-3.7/jsonobject/api.o
jsonobject/api.c:16:10: fatal error: Python.h: No such file or directory
16 | #include “Python.h”
| ^~~~~~~~~~
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1

ERROR: Failed building wheel for jsonobject
ERROR: Command errored out with exit status 1:
command: /home/erpnxtadmin/frappe-bench/env/bin/python -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/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-og1hxajz/install-record.txt --single-version-externally-managed --compile --install-headers /home/erpnxtadmin/frappe-bench/env/include/site/python3.7/jsonobject
cwd: /tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/
Complete output (26 lines):
You are running without Cython installed. It is highly recommended to run
pip install cython>=0.29.21,<1.0.0
before you continue
/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/setuptools/init.py:151: SetuptoolsDeprecationWarning: setup_requires is deprecated. Supply build dependencies using PEP 517 pyproject.toml build-requires.
SetuptoolsDeprecationWarning,
Warning: ‘classifiers’ should be a list, got type ‘tuple’
running install
/home/erpnxtadmin/frappe-bench/env/lib/python3.7/site-packages/setuptools/command/install.py:37: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
setuptools.SetuptoolsDeprecationWarning,
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.7
creating build/lib.linux-x86_64-3.7/jsonobject
copying jsonobject/init.py → build/lib.linux-x86_64-3.7/jsonobject
copying jsonobject/exceptions.py → build/lib.linux-x86_64-3.7/jsonobject
running build_ext
building ‘jsonobject.api’ extension
creating build/temp.linux-x86_64-3.7
creating build/temp.linux-x86_64-3.7/jsonobject
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fdebug-prefix-map=/build/python3.7-w3mY2c/python3.7-3.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -g -fdebug-prefix-map=/build/python3.7-w3mY2c/python3.7-3.7.12=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/home/erpnxtadmin/frappe-bench/env/include -I/usr/include/python3.7m -c jsonobject/api.c -o build/temp.linux-x86_64-3.7/jsonobject/api.o
jsonobject/api.c:16:10: fatal error: Python.h: No such file or directory
16 | #include “Python.h”
| ^~~~~~~~~~
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc’ failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/erpnxtadmin/frappe-bench/env/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-zj59imkz/jsonobject_e7c10fb5293e4e82b91af72fba9aa4f0/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-og1hxajz/install-record.txt --single-version-externally-managed --compile --install-headers /home/erpnxtadmin/frappe-bench/env/include/site/python3.7/jsonobject Check the logs for full command output.

1 Like

Install python3.8-dev , should do the trick.
i had to redo my server with python3.8 and she works

1 Like

This worked for me too. thank you @msalim79

I installed 3.8 then migrated my env:

bench migrate-env python3.8

1 Like