question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pip install peewee fails on Windows

See original GitHub issue

pip install peewee in an administrator PowerShell fails due to error: [WinError 2] The system cannot find the file specified

  • OS: Windows 10
  • Python: 3.6.4 Anaconda 64 bit
  • Cython v0.27.3

The same error occurs when installing via git:

git clone https://github.com/coleifer/peewee.git
cd peewee
python setup.py install

Full error

PS C:\WINDOWS\system32> pip install peewee
Collecting peewee
  Using cached peewee-3.1.0.tar.gz
Building wheels for collected packages: peewee
  Running setup.py bdist_wheel for peewee ... error
  Complete output from command c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\MASTER~1\\AppData\\Local\\Temp\\pip-build-t74nv3gg\\peewee\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\MASTER~1\AppData\Local\Temp\tmp9jj2p59dpip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.6
  copying peewee.py -> build\lib.win-amd64-3.6
  copying pwiz.py -> build\lib.win-amd64-3.6
  creating build\lib.win-amd64-3.6\playhouse
  copying playhouse\apsw_ext.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\dataset.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\db_url.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\fields.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\flask_utils.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\hybrid.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\migrate.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\pool.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\postgres_ext.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\reflection.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\shortcuts.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\signals.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\sqlcipher_ext.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\sqliteq.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\sqlite_ext.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\sqlite_udf.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\test_utils.py -> build\lib.win-amd64-3.6\playhouse
  copying playhouse\__init__.py -> build\lib.win-amd64-3.6\playhouse
  running build_ext
  error: [WinError 2] The system cannot find the file specified

  ----------------------------------------
  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 c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\MASTER~1\\AppData\\Local\\Temp\\pip-build-t74nv3gg\\peewee\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\MASTER~1\AppData\Local\Temp\pip-i4m4596t-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.6
    copying peewee.py -> build\lib.win-amd64-3.6
    copying pwiz.py -> build\lib.win-amd64-3.6
    creating build\lib.win-amd64-3.6\playhouse
    copying playhouse\apsw_ext.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\dataset.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\db_url.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\fields.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\flask_utils.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\hybrid.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\migrate.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\pool.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\postgres_ext.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\reflection.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\shortcuts.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\signals.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\sqlcipher_ext.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\sqliteq.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\sqlite_ext.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\sqlite_udf.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\test_utils.py -> build\lib.win-amd64-3.6\playhouse
    copying playhouse\__init__.py -> build\lib.win-amd64-3.6\playhouse
    running build_ext
    error: [WinError 2] The system cannot find the file specified

    ----------------------------------------
Command "c:\programdata\anaconda3\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\MASTER~1\\AppData\\Local\\Temp\\pip-build-t74nv3gg\\peewee\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\MASTER~1\AppData\Local\Temp\pip-i4m4596t-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\MASTER~1\AppData\Local\Temp\pip-build-t74nv3gg\peewee\

PS C:\WINDOWS\system32> python --version
Python 3.6.4 :: Anaconda custom (64-bit)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
coleifercommented, Feb 27, 2018

Thanks for sharing the traceback, this is the problem:

playhouse/_sqlite_ext.c:531:21: fatal error: sqlite3.h: No such file or directory

It looks like you’ve got Cython and a C compiler installed, but are missing the SQLite3 headers. You should be able to:

sudo apt-get install libsqlite3-dev

I wonder if there’s a way, in setup.py, to test for the existence of the appropriate headers?

0reactions
pymqcommented, Jul 15, 2018

sudo apt-get install libsqlite3-dev

Thanks! Maybe it should be specified in the installation docs?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failing to install Peewee with Pip · Issue #1676 - GitHub
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....
Read more >
Fail to install peewee under WinPython - Stack Overflow
I am trying to pip install peewee on Windows using WinPython (2 or 3) and the installation chokes on the absence of the...
Read more >
Installing and Testing — peewee 3.15.4 documentation
Installing and Testing¶. Most users will want to simply install the latest version, hosted on PyPI: pip install peewee.
Read more >
Peewee wont install (Example) | Treehouse Community
Hi there I am having trouble installing the peewee OCR library on my Windows 10 system using "pip install peewee". I have tried...
Read more >
How to Install the PeeWee Python library on Windows 10/ 11
Learn how to install the PeeWee library on Windows 10. PeeWee is an ORM.We will also install Python and pip. PIP is used...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found