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

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.

Related

C++ set-up for Visual Studio Code not working

So I am trying to code C++ on Visual Studio Code. I am following a tutorial from youtube. https://www.youtube.com/watch?v=DIw02CaEusY&t=597s
When I get to 9:58 is where I loose track. He gets a message on his #include that says edit "InlcudePath" settings
I am doing the exact same thing as him and mine doesn't work. I am not sure why. I will show screenshots of his video and my code. I would greatly appreciate if someone could help me. Thanks!
This is the youtube video's image
This is my image
You can follow this official tutorial to setup your VSCode environment, which is always up-to-date:
https://code.visualstudio.com/docs/languages/cpp
In short:
Open extension tab
Install "C/C++" extension.
Install compiler, depending on your OS:
Debian/Ubuntu: Install GCC using sudo apt install build-essential
Windows with BuildTools from Microsoft: Install Build Tools for Visual Studio 2019 from here: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
Windows with MinGW: Install MinGW like in the video you provided.
macOS: Install XCode
Follow one of the tutorial to setup VSCode:
Windows with BuildTools from Microsoft: https://code.visualstudio.com/docs/cpp/config-msvc
Windows with MinGW: https://code.visualstudio.com/docs/cpp/config-mingw
macOS: https://code.visualstudio.com/docs/cpp/config-clang-mac
VSCode, depending on your platform should automatically find the compiler you have installed. You can try also to restart VSCode if can't find any.
You should see .vscode directory in your project,
VSCode will ask you if you want to create those files.
error related to path , i guess you have to set the path of mingw bin folder in path of enter image description hereenvironmental variables in system variable

zlib.vcproj missing while installing Cairo for C++

I'm following this guide to download and install Cairo
https://www.cairographics.org/end_to_end_build_for_win32/
I'm in Windows 10, Visual Studio 2017, when i need (following the guide) to copy the zlib.vcproj file the cmd can't find it.
In the guide
BUILD ZLIB
mkdir %ROOTDIR%\zlib\projects\visualc71
cd %ROOTDIR%\zlib\projects\visualc71
copy %ROOTDIR%\libpng\projects\visualc71\zlib.vcproj
Download and install vcpkg, a command-line package manager, from GitHub.com. And use a one liner command to install the cairo package for use with VS 2017 like so. It makes almost effortless to install many open source libraries.
.\vcpkg install cairo:x64-windows

vcpkg setup errors on command line

I am trying to compile dlib 19.4 using the vcpkg tool
since I am having trouble compiling CMAKE and working with Boost.Python
to fix compiler issues for dlib.
Though I am having problems even running the basic steps
to get the vcpkg package to work:
(I also downloaded Visual Studio 2017 for this tool)
Looking at executed command (git init), you initialized empty git repository for vcpkg - that is likely wrong. This bootstrap.ps1 script fails internally when trying to fetch existing revisions. vcpkg doesn't want to reside in just any git repository, it wants "its" git repository. vcpkg uses git as a distribution platform and later to perform updates.
So instead, you should clone vcpkg repository to some directory, e.g.:
C:\test>git clone https://github.com/Microsoft/vcpkg.git vcpkg_test
Cloning into 'vcpkg_test'...
...
Checking out files: 100% (876/876), done.
C:\test>cd vcpkg_test
C:\test\vcpkg_test>powershell -exec bypass scripts\bootstrap.ps1
https://github.com/Microsoft/vcpkg/
Additionally I see errors regarding VS2017 C++ support. VS2017 is an IDE with multiple optionally supported languages (i.e. you could have only C# support installed). Please make sure you have "Desktop development with C++" workload installed - as vcpkg is for C++. You can update the installation at any time by running installer again (Modify).
https://learn.microsoft.com/en-us/visualstudio/install/install-visual-studio

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.

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

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.