Search code examples
pythonpipodoo

In Ubuntu 16.04 Python 3.7 these requirements unable to install for Odoo 13


I am unable to figure out whats going on ? It throws some error while I am installing these requirements. I am installing this in the virtual environment. I tried this installation with python 3.8 many times and get the same error. The details are:

requirements.txt file used to install

Babel==2.6.0
chardet==3.0.4
decorator==4.3.0
docutils==0.14
ebaysdk==2.1.5
feedparser==5.2.1
gevent==1.1.2 ; sys_platform != 'win32' and python_version < '3.7'
gevent==1.3.7 ; sys_platform != 'win32' and python_version >= '3.7'
gevent==1.4.0 ; sys_platform == 'win32'
greenlet==0.4.10 ; python_version < '3.7'
greenlet==0.4.15 ; python_version >= '3.7'
html2text==2018.1.9
Jinja2==2.10.1
libsass==0.17.0
lxml==3.7.1 ; sys_platform != 'win32' and python_version < '3.7'
lxml==4.3.2 ; sys_platform != 'win32' and python_version >= '3.7'
lxml ; sys_platform == 'win32'
Mako==1.0.7
MarkupSafe==1.1.0
mock==2.0.0
num2words==0.5.6
ofxparse==0.19
passlib==1.7.1
Pillow==5.4.1 ; python_version < '3.7' or sys_platform != 'win32'
Pillow==6.1.0 ; sys_platform == 'win32' and python_version >= '3.7'
polib==1.1.0
psutil==5.5.1
psycopg2==2.7.7; sys_platform != 'win32'
psycopg2==2.8.3; sys_platform == 'win32'
pydot==1.4.1
pyldap==2.4.28; sys_platform != 'win32'
pyparsing==2.2.0
PyPDF2==1.26.0
pyserial==3.4
python-dateutil==2.7.3
pytz==2019.1
pyusb==1.0.2
qrcode==6.1
reportlab==3.5.13
requests==2.21.0
zeep==3.2.0
vatnumber==1.2
vobject==0.9.6.1
Werkzeug==0.14.1
XlsxWriter==1.1.2
xlwt==1.3.*
xlrd==1.1.0
pypiwin32 ; sys_platform == 'win32'

Installation command:

 pip install -r ./odoo-13.0/requirements.txt

Ignoring gevent: markers 'sys_platform != "win32" and python_version < "3.7"' don't match your environment
Ignoring gevent: markers 'sys_platform == "win32"' don't match your environment
Ignoring greenlet: markers 'python_version < "3.7"' don't match your environment
Ignoring lxml: markers 'sys_platform != "win32" and python_version < "3.7"' don't match your environment
Ignoring lxml: markers 'sys_platform == "win32"' don't match your environment
Ignoring Pillow: markers 'sys_platform == "win32" and python_version >= "3.7"' don't match your environment
Ignoring psycopg2: markers 'sys_platform == "win32"' don't match your environment
Ignoring pypiwin32: markers 'sys_platform == "win32"' don't match your environment
Collecting Babel==2.6.0
  Using cached Babel-2.6.0-py2.py3-none-any.whl (8.1 MB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting decorator==4.3.0
  Using cached decorator-4.3.0-py2.py3-none-any.whl (9.2 kB)
Collecting docutils==0.14
  Using cached docutils-0.14-py3-none-any.whl (543 kB)
Collecting ebaysdk==2.1.5
  Using cached ebaysdk-2.1.5.tar.gz (42 kB)
Collecting feedparser==5.2.1
  Using cached feedparser-5.2.1.tar.bz2 (192 kB)
Collecting gevent==1.3.7
  Downloading gevent-1.3.7-cp37-cp37m-manylinux1_x86_64.whl (4.5 MB)
     |████████████████████████████████| 4.5 MB 334 kB/s 
Collecting greenlet==0.4.15
  Downloading greenlet-0.4.15-cp37-cp37m-manylinux1_x86_64.whl (42 kB)
     |████████████████████████████████| 42 kB 78 kB/s 
Collecting html2text==2018.1.9
  Using cached html2text-2018.1.9-py3-none-any.whl (21 kB)
Collecting Jinja2==2.10.1
  Using cached Jinja2-2.10.1-py2.py3-none-any.whl (124 kB)
Collecting libsass==0.17.0
  Downloading libsass-0.17.0-cp37-cp37m-manylinux1_x86_64.whl (9.2 MB)
     |████████████████████████████████| 9.2 MB 36 kB/s 
Collecting lxml==4.3.2
  Downloading lxml-4.3.2-cp37-cp37m-manylinux1_x86_64.whl (5.7 MB)
     |████████████████████████████████| 5.7 MB 646 kB/s 
Collecting Mako==1.0.7
  Using cached Mako-1.0.7.tar.gz (564 kB)
Collecting MarkupSafe==1.1.0
  Downloading MarkupSafe-1.1.0-cp37-cp37m-manylinux1_x86_64.whl (27 kB)
Collecting mock==2.0.0
  Using cached mock-2.0.0-py2.py3-none-any.whl (56 kB)
Collecting num2words==0.5.6
  Using cached num2words-0.5.6-py2.py3-none-any.whl (64 kB)
Collecting ofxparse==0.19
  Using cached ofxparse-0.19.tar.gz (54 kB)
Collecting passlib==1.7.1
  Using cached passlib-1.7.1-py2.py3-none-any.whl (498 kB)
Collecting Pillow==5.4.1
  Downloading Pillow-5.4.1-cp37-cp37m-manylinux1_x86_64.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 636 kB/s 
Collecting polib==1.1.0
  Using cached polib-1.1.0-py2.py3-none-any.whl (25 kB)
Collecting psutil==5.5.1
  Using cached psutil-5.5.1.tar.gz (426 kB)
Collecting psycopg2==2.7.7
  Downloading psycopg2-2.7.7-cp37-cp37m-manylinux1_x86_64.whl (2.7 MB)
     |████████████████████████████████| 2.7 MB 848 kB/s 
Collecting pydot==1.4.1
  Using cached pydot-1.4.1-py2.py3-none-any.whl (19 kB)
Collecting pyldap==2.4.28
  Using cached pyldap-2.4.28.tar.gz (130 kB)
Collecting pyparsing==2.2.0
  Using cached pyparsing-2.2.0-py2.py3-none-any.whl (56 kB)
Collecting PyPDF2==1.26.0
  Using cached PyPDF2-1.26.0.tar.gz (77 kB)
Collecting pyserial==3.4
  Using cached pyserial-3.4-py2.py3-none-any.whl (193 kB)
Collecting python-dateutil==2.7.3
  Using cached python_dateutil-2.7.3-py2.py3-none-any.whl (211 kB)
Collecting pytz==2019.1
  Using cached pytz-2019.1-py2.py3-none-any.whl (510 kB)
Collecting pyusb==1.0.2
  Using cached pyusb-1.0.2.tar.gz (54 kB)
Collecting qrcode==6.1
  Using cached qrcode-6.1-py2.py3-none-any.whl (31 kB)
Collecting reportlab==3.5.13
  Downloading reportlab-3.5.13-cp37-cp37m-manylinux1_x86_64.whl (2.6 MB)
     |████████████████████████████████| 2.6 MB 363 kB/s 
Collecting requests==2.21.0
  Using cached requests-2.21.0-py2.py3-none-any.whl (57 kB)
Collecting zeep==3.2.0
  Using cached zeep-3.2.0-py2.py3-none-any.whl (98 kB)
Collecting vatnumber==1.2
  Using cached vatnumber-1.2.tar.gz (19 kB)
Collecting vobject==0.9.6.1
  Using cached vobject-0.9.6.1.tar.gz (58 kB)
Collecting Werkzeug==0.14.1
  Using cached Werkzeug-0.14.1-py2.py3-none-any.whl (322 kB)
Collecting XlsxWriter==1.1.2
  Using cached XlsxWriter-1.1.2-py2.py3-none-any.whl (142 kB)
Collecting xlwt==1.3.*
  Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Collecting xlrd==1.1.0
  Using cached xlrd-1.1.0-py2.py3-none-any.whl (108 kB)
Collecting six
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting pbr>=0.11
  Using cached pbr-5.4.4-py2.py3-none-any.whl (110 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.8.2-py3-none-any.whl (106 kB)
Requirement already satisfied: setuptools in ./venv/lib/python3.7/site-packages/setuptools-40.8.0-py3.7.egg (from pyldap==2.4.28->-r ./odoo-13.0/requirements.txt (line 31)) (40.8.0)
Collecting certifi>=2017.4.17
  Using cached certifi-2019.11.28-py2.py3-none-any.whl (156 kB)
Collecting idna<2.9,>=2.5
  Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
Collecting urllib3<1.25,>=1.21.1
  Using cached urllib3-1.24.3-py2.py3-none-any.whl (118 kB)
Collecting attrs>=17.2.0
  Using cached attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting isodate>=0.5.4
  Using cached isodate-0.6.0-py2.py3-none-any.whl (45 kB)
Collecting defusedxml>=0.4.1
  Using cached defusedxml-0.6.0-py2.py3-none-any.whl (23 kB)
Collecting appdirs>=1.4.0
  Using cached appdirs-1.4.3-py2.py3-none-any.whl (12 kB)
Collecting requests-toolbelt>=0.7.1
  Using cached requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
Collecting cached-property>=1.3.0
  Using cached cached_property-1.5.1-py2.py3-none-any.whl (6.0 kB)
Collecting python-stdnum
  Using cached python_stdnum-1.13-py2.py3-none-any.whl (839 kB)
Collecting soupsieve>=1.2
  Using cached soupsieve-1.9.5-py2.py3-none-any.whl (33 kB)
Installing collected packages: pytz, Babel, chardet, decorator, docutils, lxml, certifi, idna, urllib3, requests, ebaysdk, feedparser, greenlet, gevent, html2text, MarkupSafe, Jinja2, six, libsass, Mako, pbr, mock, num2words, soupsieve, beautifulsoup4, ofxparse, passlib, Pillow, polib, psutil, psycopg2, pyparsing, pydot, pyldap, PyPDF2, pyserial, python-dateutil, pyusb, qrcode, reportlab, attrs, isodate, defusedxml, appdirs, requests-toolbelt, cached-property, zeep, python-stdnum, vatnumber, vobject, Werkzeug, XlsxWriter, xlwt, xlrd
    Running setup.py install for ebaysdk ... done
    Running setup.py install for feedparser ... done
    Running setup.py install for Mako ... done
    Running setup.py install for ofxparse ... done
    Running setup.py install for psutil ... error
    ERROR: Command errored out with exit status 1:
     command: /home/dev/odoo13_home/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1upsixt0/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1upsixt0/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1e926ya6/install-record.txt --single-version-externally-managed --compile --install-headers /home/dev/odoo13_home/venv/include/site/python3.7/psutil
         cwd: /tmp/pip-install-1upsixt0/psutil/
    Complete output (41 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/psutil
    copying psutil/_psosx.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_pslinux.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_psbsd.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_psaix.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_psposix.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_pssunos.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_common.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_compat.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/__init__.py -> build/lib.linux-x86_64-3.7/psutil
    copying psutil/_pswindows.py -> build/lib.linux-x86_64-3.7/psutil
    creating build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_connections.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_contracts.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_system.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_osx.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_bsd.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_aix.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/__init__.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_linux.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_windows.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_misc.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_unicode.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_posix.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_sunos.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/__main__.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_memory_leaks.py -> build/lib.linux-x86_64-3.7/psutil/tests
    copying psutil/tests/test_process.py -> build/lib.linux-x86_64-3.7/psutil/tests
    running build_ext
    building 'psutil._psutil_linux' extension
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/psutil
    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 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=551 -DPSUTIL_LINUX=1 -I/home/dev/odoo13_home/venv/include -I/usr/include/python3.7m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.7/psutil/_psutil_common.o
    psutil/_psutil_common.c:9: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: Command errored out with exit status 1: /home/dev/odoo13_home/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1upsixt0/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1upsixt0/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1e926ya6/install-record.txt --single-version-externally-managed --compile --install-headers /home/dev/odoo13_home/venv/include/site/python3.7/psutil Check the logs for full command output.

Solution

  • fatal error: Python.h: No such file or directory
    

    This error means that there is no Python development package installed in your system, which is required to compile those Python packages. For default Python3 package you can install development package using following command:

    sudo apt-get install python3-dev
    

    This command will install Python3 development package from Ubuntu default repo, which contains Python version 3.5. You can check with following command:

    apt-cache madison python3-dev
    

    If you want to install for other versions, you can use deadsnakes repo

    sudo add-apt-repository ppa:deadsnakes/ppa
    sudo apt-get update
    sudo apt-get install python3.7-dev