Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python

Liat Hoffman
Liat Hoffman
9,316 Points

Peewee wont install

Hi there I am having trouble installing the peewee OCR library on my Windows 10 system using "pip install peewee". I have tried installing Visual Studio 14 and 8, and changing the system variable to point to VS 8 Tools bin - nothing has worked. Any help would be much appreciated!!

This is the print out on my console:

Collecting peewee
  Using cached peewee-2.7.3.tar.gz
Installing collected packages: peewee
  Running setup.py install for peewee
    Complete output from command C:\Users\-----\AppData\Local\Continuum\Anaconda3\python.exe -c "import setuptools, t
okenize;__file__='C:\\Users\\-----\\AppData\\Local\\Temp\\pip-build-alkyy7d0\\peewee\\setup.py';exec(compile(getattr(
tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\------\A
ppData\Local\Temp\pip-qsqbydvg-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.4
    copying peewee.py -> build\lib.win-amd64-3.4
    copying pwiz.py -> build\lib.win-amd64-3.4
    creating build\lib.win-amd64-3.4\playhouse
    copying playhouse\apsw_ext.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\berkeleydb.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\csv_loader.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\csv_utils.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\dataset.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\db_url.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\djpeewee.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\fields.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\flask_utils.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\gfk.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\hybrid.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\kv.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\migrate.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\pool.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\postgres_ext.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\proxy.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\read_slave.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\reflection.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\shortcuts.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\signals.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\sqlcipher_ext.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\sqlite_ext.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\test_utils.py -> build\lib.win-amd64-3.4\playhouse
    copying playhouse\__init__.py -> build\lib.win-amd64-3.4\playhouse
    running build_ext
    cythoning playhouse/speedups.pyx to playhouse\speedups.c
    building 'playhouse._speedups' extension
    error: Microsoft Visual C++ 10.0 is required (Unable to find vcvarsall.bat).

    ----------------------------------------
Command "C:\Users\------\AppData\Local\Continuum\Anaconda3\python.exe -c "import setuptools, tokenize;__file__='C:\\Us
ers\\------\\AppData\\Local\\Temp\\pip-build-alkyy7d0\\peewee\\setup.py';exec(compile(getattr(tokenize, 'open', open)(
__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record C:\Users\--------\AppData\Local\Temp\pip-qs
qbydvg-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\--------\AppData\Local\Temp\pip-build-alkyy7d0\peewee

[MOD: added ```bash formatting -cf]

Farrah Dickerson
Farrah Dickerson
10,173 Points

Could you do me a favor and verify that Microsoft Visual C++ 10.0 is installed? If not, that might be your issue: https://www.microsoft.com/en-us/download/details.aspx?id=5555

Liat Hoffman
Liat Hoffman
9,316 Points

Thanks for your help, Farrah. Yes, I can confirm it is installed - I have Visual C++ 2008 Express, and just in case reinstalled it through the link you provided. It is still not letting me install peewee.

6 Answers

Liat Hoffman
Liat Hoffman
9,316 Points

thanks for the tip. I'll definitely keep that in mind for my next machine. Tho for now, pretty bummed that I cant throw myself into databases until this peewee situation is resolved. PS, thanks for being a seriously awesome teacher.

Jeremy McLain
STAFF
Jeremy McLain
Treehouse Guest Teacher

I'm not familiar with installing Python using Anaconda. You might want to try using the standard Python Windows installer. https://www.python.org/downloads/

Once it's installed you just need to run pip install peewee

I just did it myself and I didn't have any problems.

An alternative way to install Python and packages is using Visual Studio 2015. https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx

Liat Hoffman
Liat Hoffman
9,316 Points

I tried installing python with standard Windows installer - same exception is being thrown. I have VS 2015 installed and when I tried to use it with Python, it throws another exception. Are you using Windows 10?

I was having the same issue as you. Here is the solution that worked for me. Just installing visual studio is not enough. You must go to CUSTOM installation and make sure Common Tools for visual c++ is checked. It is NOT checked automatically in the express installation. I also selected Python tools for visual studios for good measure. Here is the link to the original stack overflow answer.

http://stackoverflow.com/questions/33323172/vcvarsall-bat-needed-for-python-to-compile-missing-from-visual-studio-2015-v-1

I have the same problem with peewee installation

Please advice

Solved this problem by installing Microsoft Visual Studio https://www.visualstudio.com/ During installation choose needed modules python. After installation works fine in cmd with pip install peewee

I've windows 10. Hope it'll helps

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

Hmm, I know very little about the Windows ecosystem, but maybe Jeremy McLain can provide some advice. He's our C# teacher and has Python experience, too. Any ideas, Jeremy?

Liat Hoffman
Liat Hoffman
9,316 Points

thanks so much for your help. Out of interest, what kind of OS / ecosystem do you recommend for working in Python? I have run into many frustrations using Windows.

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Really, most of the time, Python is fine on any OS. Windows does have some catching up to do, though, when it comes to working with open source technologies.

I'm a big fan of Mac OS, myself.

Jeremy McLain
Jeremy McLain
Treehouse Guest Teacher

I'll take a look. Liat Hoffman did you install Python using Visual Studio Community or did you download the installer and install it that way?

Liat Hoffman
Liat Hoffman
9,316 Points

Hi Jeremy. I installed python using Anaconda during a community data science workshop - the exact instructions are here: http://wiki.communitydata.cc/Community_Data_Science_Workshops_(Fall_2015)/Day_0_setup_and_tutorial