Skip to content

Failing to install Peewee with Pip #1676

Description

@lmm-git

Hi,

currently I am having a lot of trouble installing Peewee. When executing pip3 install -r requirements.txt on a Ubuntu 16.04 LTS I get

Collecting peewee~=3.6.1
  Using cached https://files.pythonhosted.org/packages/2c/08/b059dd7cc0fa6ae45af86f36660fb0838463390d5626d37b8595e54efd9e/peewee-3.6.1.tar.gz
Building wheels for collected packages: peewee
  Running setup.py bdist_wheel for peewee ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-weh5o8st/peewee/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmpaceuk7nvpip-wheel- --python-tag cp35:
  /home/lmm/.local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
    """)
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.5
  copying peewee.py -> build/lib.linux-x86_64-3.5
  copying pwiz.py -> build/lib.linux-x86_64-3.5
  creating build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/fields.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/flask_utils.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/__init__.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/dataset.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/shortcuts.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/sqlite_ext.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/sqlcipher_ext.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/migrate.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/kv.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/apsw_ext.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/signals.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/sqliteq.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/test_utils.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/mysql_ext.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/sqlite_udf.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/hybrid.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/db_url.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/pool.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/postgres_ext.py -> build/lib.linux-x86_64-3.5/playhouse
  copying playhouse/reflection.py -> build/lib.linux-x86_64-3.5/playhouse
  running build_ext
  building 'playhouse._speedups' extension
  creating build/temp.linux-x86_64-3.5
  creating build/temp.linux-x86_64-3.5/playhouse
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c playhouse/_speedups.c -o build/temp.linux-x86_64-3.5/playhouse/_speedups.o
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/playhouse/_speedups.o -o build/lib.linux-x86_64-3.5/playhouse/_speedups.cpython-35m-x86_64-linux-gnu.so
  building 'playhouse._sqlite_udf' extension
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c playhouse/_sqlite_udf.c -o build/temp.linux-x86_64-3.5/playhouse/_sqlite_udf.o
  x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/playhouse/_sqlite_udf.o -o build/lib.linux-x86_64-3.5/playhouse/_sqlite_udf.cpython-35m-x86_64-linux-gnu.so
  building 'playhouse._sqlite_ext' extension
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c playhouse/_sqlite_ext.c -o build/temp.linux-x86_64-3.5/playhouse/_sqlite_ext.o
  playhouse/_sqlite_ext.c:531:21: fatal error: sqlite3.h: No such file or directory
  compilation terminated.
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
  
  ----------------------------------------
  Failed building wheel for peewee
  Running setup.py clean for peewee
Failed to build peewee
Installing collected packages: peewee
  Running setup.py install for peewee ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-weh5o8st/peewee/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_l2_k4ko-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    /home/lmm/.local/lib/python3.5/site-packages/psycopg2/__init__.py:144: UserWarning: The psycopg2 wheel package will be renamed from release 2.8; in order to keep installing from binary please use "pip install psycopg2-binary" instead. For details see: <http://initd.org/psycopg/docs/install.html#binary-install-from-pypi>.
      """)
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    copying peewee.py -> build/lib.linux-x86_64-3.5
    copying pwiz.py -> build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/fields.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/flask_utils.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/__init__.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/dataset.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/shortcuts.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/sqlite_ext.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/sqlcipher_ext.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/migrate.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/kv.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/apsw_ext.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/signals.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/sqliteq.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/test_utils.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/mysql_ext.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/sqlite_udf.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/hybrid.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/db_url.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/pool.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/postgres_ext.py -> build/lib.linux-x86_64-3.5/playhouse
    copying playhouse/reflection.py -> build/lib.linux-x86_64-3.5/playhouse
    running build_ext
    building 'playhouse._speedups' extension
    creating build/temp.linux-x86_64-3.5
    creating build/temp.linux-x86_64-3.5/playhouse
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c playhouse/_speedups.c -o build/temp.linux-x86_64-3.5/playhouse/_speedups.o
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/playhouse/_speedups.o -o build/lib.linux-x86_64-3.5/playhouse/_speedups.cpython-35m-x86_64-linux-gnu.so
    building 'playhouse._sqlite_udf' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c playhouse/_sqlite_udf.c -o build/temp.linux-x86_64-3.5/playhouse/_sqlite_udf.o
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5/playhouse/_sqlite_udf.o -o build/lib.linux-x86_64-3.5/playhouse/_sqlite_udf.cpython-35m-x86_64-linux-gnu.so
    building 'playhouse._sqlite_ext' extension
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c playhouse/_sqlite_ext.c -o build/temp.linux-x86_64-3.5/playhouse/_sqlite_ext.o
    playhouse/_sqlite_ext.c:531:21: fatal error: sqlite3.h: No such file or directory
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-weh5o8st/peewee/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-_l2_k4ko-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-weh5o8st/peewee/
You are using pip version 8.1.1, however version 10.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

For me it seems related to the fact I do not have the sqlite dev package installed, but I would think this should not be required for installing peewee, or is it?

Thanks in advance!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions