Peewee: pip install peewee fails with Anaconda on Win10

Created on 23 Mar 2018  路  10Comments  路  Source: coleifer/peewee

pip install peewee fails with Anaconda on Windows 10.

  • OS: Windows 10
  • Python: Python 3.6.4 :: Anaconda, Inc.
  • Cython: 0.27.3

error

playhouse\_sqlite_ext.c(531): fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory
    error: command 'D:\\MyIDE\\VS2015\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

But when I used official Python without Anaconda, it installed successfully.So what can I do for installing peewee successfully with Python in Anaconda?

Most helpful comment

@coleifer conda install -c conda-forge peewee can solve this problem, the only regrettable thing is that the version of peewee is a little old, just 2.10.2.

Supplement 2018.4.10
The version of peewee is v3.1.5, it's enough to use for me.

All 10 comments

Hmm... I don't know, with setup.py, how to check if a header file/shared lib is going to be available ahead-of-time.

@coleifer conda install -c conda-forge peewee can solve this problem, the only regrettable thing is that the version of peewee is a little old, just 2.10.2.

Supplement 2018.4.10
The version of peewee is v3.1.5, it's enough to use for me.

Ew, yeah... Peewee has much more extensive integration with SQLite in 3.x, although it's restricted to a module in playhouse. I'm not sure how to conditionally compile that, if Cython and a C compiler is installed but sqlite is not?

Cython and a C compiler has installed.
conda list:
sqlite 3.22.0 h9d3ae62_0
So I'm puzzled about installing peewee fail with pip.
Or can you update the version of peewee in conda-forge?

I have no idea what conda is?

Anaconda is a python and R distribution. It aims to provide everything you need (python wise) for data science "out of the box".
It includes:

  • The core python language
  • 100+ python "packages" (libraries)
  • Spyder (IDE/editor - like pycharm) and Jupyter
  • conda, Anaconda's own package manager, used for updating Anaconda and packages

See here, it may help to update the version of peewee.

@happylrd probably better to ask here since it seems the conda package wasn't made by coleifer.

It looks like @pmlandwehr and @dharhas have marked themselves as the maintainers of that.

Let me rephrase: I totally don't care what conda is.

I'd suggest you check it out with whoever the maintainers are.

For all you winblows lusers out there, I've added an option to the setup.py script to skip building SQLite-specific C extensions. Docs here:

http://docs.peewee-orm.com/en/latest/peewee/installation.html#skip-compilation-of-sqlite-extensions

This environment var is supported in the latest version on PyPI -- 3.1.7, which I just pushed. Hope this helps!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

serkandaglioglu picture serkandaglioglu  路  4Comments

alexlatchford picture alexlatchford  路  4Comments

lucasrc picture lucasrc  路  5Comments

ezk84 picture ezk84  路  4Comments

razodactyl picture razodactyl  路  3Comments