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

Gabor Galantai
PLUS
Gabor Galantai
Courses Plus Student 17,247 Points

Peewee install error: unable to find vcvarsall.bat

I ran into this error "Unable to find vcvarsall.bat" while trying to install peewee (pip install peewee) on Windows 8. I saw the other topic where there was a solution offered, but that didn't solve it for me. Please help. Kenneth Love, Jeremy McLain or someone.

2 Answers

Hey Gabor!

I had the same problem. I followed the instructions in this blogpost. It gives you a great overview of what that file is and why you need it. I'll give you a rundown of the steps I took, but, if you have the time, you should defintiely check out the post :).

First, you need to make sure that setuptools is up to date. I also installed the cython package, even though it is optional.

To update setup tools:

  1. Open up the Windows PowerShell (WinKey+R and then type powershell in the prompt)
  2. paste the following command
(Invoke-WebRequest https://bootstrap.pypa.io/ez_setup.py).Content | python -
  1. Exit the PowerShell (type exit and hit Enter)

Then you need to install either Visual Studio 2015 or Visual C++ Build Tools 2015. I installed Visual Studio 2015. If you have any versions of this tool already installed, remove them and install this version.

Remember to check the Visual C++ Tools during the instalation

After the setup is complete, you should be ready to get peewee from pip.

pip install peewee

As I mentioned, you can get Cython too!

pip install cython

You can also use git (I choose to do it this way, but it should work with pip).

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

You call always refer back to the blogpost I mentioned earlier or the peewee docs install guide.

I hope I've helped you with this. I apologize for any spelling mistakes :)

Cheers

Gabor Galantai
Gabor Galantai
Courses Plus Student 17,247 Points

Thank you so much for this info. I did what you wrote, and it solved the problem. Peewee works now. Thanks!

topi
topi
7,643 Points

Solution works as charm. Thank you very much!