pyproj with Python 2.7.9 on win7 64 gives "Unable to find vcvarsall.bat" - c++

I need to install pyproj on my machine and it give the above mentioned error. I guess it would be the same for other python components that are using C++ code:
My situation:
Win 7 64 bit running.
installed:
VS 2008 express
MS VS patch for python 2.7 http://www.microsoft.com/en-us/download/confirmation.aspx?id=44266
Microsoft Windows SDK for Windows 7 and .NET Framework 3.5 SP1 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505
Python Setup Tools available here: http://pypi.python.org/pypi/setuptools#downloads
set up the path variables and set
VS90COMNTOOLS
Value: C:\Program Files (x86)\Microsoft Visual Studio 9.0\Common7\Tools
I try to install the pyproj: http://jswhit.github.io/pyproj/
but it returns the same error:
File "msvc9compiler.py", line 271, in query_vcvarsall raise DistutilsPlatformError("Unable to find vcvarsall.bat") distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
the purpose of this is to get the pygrib package running: http://jswhit.github.io/pygrib/docs/index.html
Does anybody know how to solve the problem?

You can install this without needing to compile it by using a precompiled Python wheel. You can find a compatible wheel for pyproj at this page containing unofficial wheels.
You are specifically looking for pyproj-1.9.4-cp27-none-win_amd64.whl. Once you download the whl file, you can install it with pip using
pip install pyproj-1.9.4-cp27-none-win_amd64.whl
And that will install it for you, skipping the compilation process.

Related

How to install C++ 14.0 Offline and make python aware of it?

I am trying to figure out how to install c++ 14.0 offline using suggestions from other Stackoverflow Q&A. But none of them seem to work. I need it for Cython. I don't want to install the binary version. I installed suggested redistributables and then restarted the server for paths to be applied properly but when I pip install cython.tar it still does not find the c++ 14.0 dependency. Any help would be greatly appreciated.
The following are links to what I have installed based on other Stackoverflow answers:
Microsoft Build Tools 2015: https://www.microsoft.com/en-za/download/details.aspx?id=48159
Windows 10 SDK ISO: https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk
Then I restarted the windows server and I even ran the following command suggested by some other answers:
python -m pip install setuptools --upgrade
After months of researching and trying all sorts of methods the following has worked:
Step 1: Download the build_tools.exe of your choice
Step 2: Make sure you are on a machine with the exact same environment you are going to install the c++ dependencies on. i.e. If server is windows server 2016 64bit run a vm to emulate that exact environment.
Step 3: Goto this site to get a list of all possible components you can download in the next step - https://learn.microsoft.com/en-us/visualstudio/install/workload-component-id-vs-community?view=vs-2019
Step 4: Follow the following instructions to get a local cache download of your choice -
https://learn.microsoft.com/en-us/visualstudio/install/create-an-offline-installation-of-visual-studio?view=vs-2019
Step 5: copy everything to the server and continue following the instructions from step 4
Step 6: restart the machine to apply paths properly
Step 7: copy rc.exe and rcdll.dll from C:\Program Files (x86)\Windows Kits\8.0\bin\x86 to C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin
Step 8: Download the latest setuptools from pypi.org
Step 9: run the following command with admin rights python -m pip install path/to/setuptools.tar --upgrade
Step 10: Restart machine again to apply paths.
Once all steps are followed c++ 14.0 (or of your choice) will be installed properly and linked with no issues.
Install chocolatey, then use their script to install Visual Studio 2019 build tools, better use following command:
choco install visualstudio2019buildtools --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US"
After that you will see Visual Studio GUI installer where you can manually select packages needed (be aware of size)
Source: https://chocolatey.org/packages/visualstudio2019buildtools
According to this site, "Another option is to use Microsoft’s Visual C. One must then use the same version which the installed Python was compiled with." It's likely you're not on a matching version. Cython itself recommends MinGW, which is easy enough to install following the directions on their site. Just make sure the compiler and standard library are in your Windows PATH. I believe they have to be added manually, which is pretty easy in Windows 10.
download visualcppbuildtools_full.exe file and execute.
unselect all the checkboxes.
install button will be shown, click it.
restart pc and it's done.

How to install OpenSSL on Windows 7 64bit

I am trying to install OpenSSL to use it on my C++ project in Visual Studio Express 2012 under Windows 7. Refering to this answer, I have installed perl, but when I type the command in the windows cmd, I get the following error:
[]
I have been all day trying to install it and the frustration of not having a decent documentation for dummies makes me want to give up. Where do I have to type the command to install it?
You can download bin file, example here https://wiki.openssl.org/index.php/Binaries
Then write two OPENSSL environment variable in windows(explain in photo), there is path variable.

How to install python-poppler-qt4 on windows

I would like to know how to install python-poppler-qt4 on windows.I have already installed python 2.7
,pyqt4 using window installer as well as SIP. However, when I tried to install python-poppler-qt4 through pip install, error was found :
import PYQT4.pyqtconfig
ImportError:No module named pyqt.config
From what I have understand, it is because I installed the binary packages for pyqt4 rather than from the source packages so this pyqt.config.Yet if I installed it from source, it mean that I would have to make use of MSVC or MinGW 32 bits?
How do I resolve this problem? Thank you

Testing Scipy; get "No module named msvccompiler in numpy.distutils; trying from distutils"

I'm trying to test my scipy install by installing nose and entering
import scipy
scipy.test('1','10')
I get some 200 errors but one of the more common is:
.... No module named msvccompiler in numpy.distutils; trying from distutils
Missing compiler_cxx fix for MSVCCompiler
I have MS Virtual Studio 2009 installed (required for python 2.7)
Can anyone help me eliminate that error or tell my why I can't?
Thanks
You have to do 2 things to make it find the Visual Studio Compiler:
In your environment, set VS90COMNTOOLS=%VS__vvv__COMNTOOLS% where vvv is your installed version. See other related questions on stackoverflow about setup.py and vcvarsall.bat
Run python from a Visual Studio Developer Command Prompt. VS includes a link for this in the start menu. It sets up all the environment variables you need to run the compilers and related tools from the command line.
Best solution to this could be using the Anaconda Python distribution
It has most of the engineering and data analysis packages and automatically sets path of the C++ compiler. You can easily install numpy, scipy, matplotlib etc. using Anaconda. It will not show vcvarshall.bat as well as numpy.core.multiarray error for numpy

Trouble Installing PythonMagick Windows 7

I am trying to install PythonMagick. I am using Python 2.7 and running Windows 7. I have tried following the directions in the readme, but all of the configuration scripts are of type "file" and cannot be executed in either the python or windows command line. What should I do?
I recommend you use the pre-compiled installer from the Unofficial Windows Binaries for Python Extension Packages.
Just follow this link and download the right installer for your Python interpreter (in your case it will either be PythonMagick-0.9.10.win-amd64-py2.7.‌exe or PythonMagick-0.9.10.win32-py2.7.‌exe, depending on whether you've installed the 64 or 32 bit Python interpreter).