Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c0ldlimit/5095b384db3595869ebb to your computer and use it in GitHub Desktop.
Save c0ldlimit/5095b384db3595869ebb to your computer and use it in GitHub Desktop.
#python #windows install notes
cannot find vcvarsall.bat when trying to build Python libraries. Python 2.7 is built with the Visual Studio 2008 compiler and so extension modules must be build with the same compiler. So install VS C++ 2008 Express which will set the VS90COMNTOOLS environment variable.
http://go.microsoft.com/?linkid=7729279 - by default this version will only give you a 32-bit compiler - so it will only work for installing into a 32-bit Python.
http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat
http://stackoverflow.com/a/18045219
Update for x64 Compilers: By default this will only give you a 32-bit compiler. I learned (from here and here) that you can download specifically the Windows SDK for Windows 7 and .NET Framework 3.5 SP1 which gives you a x64 compiler for VC++ 2008 (VC++ 9.0) if you need it. Just when you are installed it, you can uncheck everything except Developer Tools >> Visual C++ Compilers which will keep you from installing all the extra SDK tools that you may not need.
Remember can pip install from url:
pip install https://pyodbc.googlecode.com/files/pyodbc-3.0.7.zip
Install an MSI on windows by extracting it using msiexec:
http://stackoverflow.com/questions/15918188/how-to-install-python-ldap-on-a-python-2-7-virtualenv-on-windows-without-compili
msiexec.exe /a python-ldap-2.4.10.win32-py2.7.msi /qn TARGETDIR="C:\Absolute\Path"
basically extract the library and paste into the Lib/site-packages folder
Install an EXE on Windows into a virtualenv
http://stackoverflow.com/questions/3271590/can-i-install-python-windows-packages-into-virtualenvs
easy_install binary_installer_built_with_distutils.exe
OR
pip install wheel
wheel convert INSTALLER.EXE
pip install NEW_FILE_CREATED_IN_LAST_STEP.whl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment