pretalx / pretalx

Conference planning tool: CfP, scheduling, speaker management
https://pretalx.com
Apache License 2.0
740 stars 207 forks source link

Installation instructions missing python[3]-dev #676

Closed kannes closed 5 years ago

kannes commented 5 years ago

I followed https://docs.pretalx.org/en/latest/administrator/installation.html on a Ubuntu 18.04 server.

At some stage of installing packages with pip, I got the following error:

...
...
Requirement already satisfied, skipping upgrade: urllib3<1.25,>=1.20; python_version >= "3.4" in /usr/lib/python3/dist-packages (from botocore<1.13.0,>=1.12.136->boto3>=1.4.4->django-bakery==0.12.*->pretalx) (1.22)
Installing collected packages: wheel, webencodings, html5lib, bleach, billiard, vine, amqp, kombu, pytz, celery, csscompressor, cssutils, Django, jmespath, docutils, python-dateutil, botocore, s3transfer, boto3, appdirs, fs, django-bakery, django-bootstrap4, django-appconf, rjsmin, rcssmin, django-compressor, django-csp, django-filter, django-jquery-js, django-formset-js-improved, django-formtools, django-hierarkey, django-i18nfield, libsass, django-libsass, djangorestframework, lxml, inlinestyler, Markdown, publicsuffixlist, pillow, reportlab, rules, urlman, vobject, whitenoise, zxcvbn, pretalx, gunicorn, psycopg2-binary
  WARNING: The script wheel is installed in '/var/pretalx/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for billiard ... done
  WARNING: The script celery is installed in '/var/pretalx/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for csscompressor ... done
  WARNING: The scripts csscapture, csscombine and cssparse are installed in '/var/pretalx/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script django-admin is installed in '/var/pretalx/.local/bin' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  Running setup.py install for django-bootstrap4 ... done
  Running setup.py install for rjsmin ... error
    ERROR: Complete output from command /usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ly76czi3/rjsmin/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-nma8tuq7/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    ERROR: running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    copying ./rjsmin.py -> build/lib.linux-x86_64-3.6
    running build_ext
    building '_rjsmin' extension
    creating build/temp.linux-x86_64-3.6
    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 -DEXT_MODULE=_rjsmin -UEXT_PACKAGE -I_setup/include -I/usr/include/python3.6m -c rjsmin.c -o build/temp.linux-x86_64-3.6/rjsmin.o
    In file included from rjsmin.c:18:0:
    _setup/include/cext.h:34:10: fatal error: Python.h: No such file or directory
     #include "Python.h"
              ^~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/bin/python3 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-ly76czi3/rjsmin/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-nma8tuq7/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-ly76czi3/rjsmin/

Installing python3-dev fixed this.

rixx commented 5 years ago

Thank you! I don't run Ubuntu myself, so this section is always in danger of being out of date, but I figure providing it like this is still better than nothing.