python - Using pip in windows -


i installed distribute , pip using links have given. installed microsoft visual c++ 2008 redistributable package. when try use pip.exe get

error: unable find vcvarsall.bat 

how can fix this?

installing microsoft visual c++ 2008 redistributable package not sufficient compile packages. need install compiler, not support files.

there 3 ways this:

  1. install visual c++.
  2. use mingw's port of gcc instead of visual c++.
  3. use cygwin's port of gcc instead of either, , cygwin build on python instead of native one.

if want go option 1, need install visual c++ itself. free version should work paid version, long you're not going build binary packages redistribute others. unfortunately, i'm not sure find 2008 version anymore. of may 2013, the download page has 2010 , 2012.

when install this, create batch file called vcvarsall.bat (not vcvarshall.bat!), , give option of putting batch file in path. running batch file sets dos prompt building version of visual c++. (this handy if have multiple versions of visual c++, or other compilers, around.) if skip option, have manually.

this question shows how use newer visual studio older python, , shows how point distutils @ vcvarsall.bat that's not on path, , has links whole lot of other relevant questions , blog posts.


many people find option 2 simpler. install mingw, modify path in environment include c:\mingw\bin (or wherever choose install it), , pass -c mingw32 whenever run setup.py script.

the problem it's not documented how tell easy_install , pip use mingw instead of vc++. that, need find or create distutils.cfg file, find or create [build] section within it, , add compiler=mingw32. not hard. this blog post looks explains things pretty well, or see this answer.


option 3 far simplest. install cygwin, tell install python , gcc packages, , you're done.

the problem don't have native windows python, have unix python running in fake unix environment on top of windows. if cygwin, you'll love this; otherwise, won't.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -