Installing PyflyCapture2 Python problems with C++ building - python

I'm currently working on a remote camera control and using a Point Grey fl3-u3-32s2c-cs. I would like to control my camera, retrieve images and so on using Python. FLIR (previously Point Gre) provides FlyCapture, which is the SDK used to work with FLIR USB 2.0, USB 3.0, Gigabit Ethernet or FireWire cameras. Since I want to work exclusively with Python, I found the python package pyflycapture2 that would fit my needs. However, when I tried to install the python package pyflycapture2, I got the error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools". And that's what I did: Download Microsoft Build Tools for Visual Studio, then I selected Workloads → Desktop development with C++, then for Individual Components, I selected only Windows 10 SDK and C++ x64/x86 build tools.
When I try to run pip install pyflycapture in the command line, I get the following error message (shown in the image file):
Error message when running pip install pyflycapture2
By lookin at the error message, it seems that it couldn't find the c++ file, in fact one part of the error says: src\flycapture2.c(235): fatal error C1083: Cannot open include file: 'FlyCapture2Defs_C.h': No such file or directory error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30037\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2
I have added the folder where I installed visual studio and where the building tools in c++ are installed into the path, but for some reason I keep getting the same error. I’m working with Windows 10 andq 64-bit operating system, x64-based processor. Any hwlp would be greatly appreciated, thank you.

Related

Error while trying create new python console project on visual studio 2022

I am using VS 2022, While trying to create new Python Console project, I get this Error message on Error list:
The reference assemblies for .NETFramework,Version=v4.0 were not
found. To resolve this, install the Developer Pack (SDK/Targeting
Pack) for this framework version or retarget your application. You can
download .NET Framework Developer Packs at
https://aka.ms/msbuild/developerpacks
The Output gives me msg:
C:\Program Files\Microsoft Visual
Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1217,5):
error MSB3644: The reference assemblies for .NETFramework,Version=v4.0
were not found. To resolve this, install the Developer Pack
(SDK/Targeting Pack) for this framework version or retarget your
application. You can download .NET Framework Developer Packs at
https://aka.ms/msbuild/developerpacks Done building project
"PythonApplicationTest.pyproj" -- FAILED.
Build FAILED.
I have tried fresh install of the VS on another machine yet still getting the same Error.
It self explnatory, download .NET Microsoft framework, you don not have it installed on your pc that is why
this is the download page
https://dotnet.microsoft.com/en-us/download

Speech Recognition in Python PyAudio needs Visual Studio Error

I am Trying to make a Program that uses Speech Recognition (SR), And I know that a popular library for this in Speech Recognition. I download speech recognition with pip install SpeechRecognition. I found Out while working on the code I need PyAudio. I tried to install this however it gave me the following error. error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/. I have looked for tutorials on how to download this, and I have download it, but it still does not work. Can someone please give me a more detailed explination or point me towards a video on how to install it for python on windows and Add it to the path. Thanks.
This problem was solved a long time agoo =]] Why you do not search on google before to ask?
Go to this commend and click on the link what is there and install it manualy.
The link what you will need to found is something like this:people.csail.mit.edu/hubert/pyaudio/packages/….
#andew i also had the same issue but then when i installed it it showed that the debuger is not working so i downeadeed my pthon version by first install th version 3.6.0 from python.org and then is visual studio code i chose the 3.6.0 interpreter and booooom it worked

install METIS library for python3 on windows7

I want to install METIS for python3.6 on windows7.I did the following steps:
1-Download the source (tar.gz or zip file) from
https://pypi.python.org/pypi/networkx-metis/
2-Unpack and change directory to the source directory (it should have the
setup.py on top level).
3-Run
python setup.py build
to build
in this step, I encountered the following error:
error: Microsoft Visual C++ 14.0 is required.
i installed "Visual Studio Tools 2017", Then I run the code again. I encountered the following error:
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio
14.0\\VC\\BIN\\cl.exe' failed with exit status 2
I would be very grateful if you answer my questions.
Although what I used was Windows 10, perhaps the same steps as I laid out here may work for you.
First, you should get the python metis wrapper using pip: pip install metis.
Second, you must install conda-metis, which you can find here. Note, it does not require you to install Anaconda to work.
Place the files in conda-metis-master in some file path.
The installation requires some fixes. Make sure you have a recent version of Visual Studios (I used 2017). For me, VS had a problem running the instructions in BUILD-WINDOWS.txt, which landed me on this thread:
Why does MSBuild look in C:\ for Microsoft.Cpp.Default.props instead of c:\Program Files (x86)\MSBuild? ( error MSB4019)
Specifically, the answer For Visual Studio 2017 and 2019 on Windows 10 was what I went with. It could potentially be different for you since you are on Windows 7.
For the python metis package, we need to generate a metis.dll, not a metis.lib file, so we must also look closer at the CMakeLists.txt (see the Linux version of this discussion here). We add on line 19: set(METIS_LIBRARY_TYPE SHARED).
You should follow the BUILD-WINDOWS.txt instructions, but run .\vsgen -G "Visual Studio 15 2017 Win64" inside your conda-metis file path in command prompt with full permissions instead of using Visual Studio 10.
Before moving on to using the files that were generated by the above command in path_to_your_metis_dir\build\windows\, we need another fix. Following what was said in:
rint() issue after creating VS Project using CMake
we have to edit the file path_to_your_metis_dir\GKlib\gk_arch.h by removing the line: #define rint(x) ((idx_t)((x)+0.5)). (Or the fix listed on this github exchange.)
Then go to path_to_your_metis_dir\build\windows\.
Open METIS.sln in Visual Studios, go to the top to Build and from the scroll-down go to Build Solution. Afterwards, the .dll file will be in path_to_your_metis_dir\build\windows\libmetis\Release\.
Last, we run in command prompt:
set METIS_DLL=path_to_your_metis_dir\build\windows\libmetis\Release\metis.dll
After this, python metis no longer failed when I would import it into my code with the step from metis import *.

Installation Common Data Format (CDF) library of Python in Windows

I'm trying to install CDF (common-data-format) in Python using easy_install cdf in Anaconda command prompt in Windows 10.
I get error messages:
"error C2036: 'void *': unknown size",
"error: Setup script exited with error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\x86_amd64\cl.exe' failed with exit status 2" preceded by a number of warnings.
When I tried to install using python setup.py install command, I got the same error.
Any help is much appreciated.
I resolved this issue by using another approach to install CDF. Use CDF installer from the link (for Windows) -
https://spdf.sci.gsfc.nasa.gov/pub/software/cdf/dist/cdf36_4/windows/
Turn off Anti virus Firewall and then install cdf36_4_0-setup-64.exe or cdf36_4_0-setup-32.exe, based on if you want a 64-bit or a 32-bit version respectively.
Without turning off Firewall, I was getting error "Insufficient system resources exist to complete the requested service".

vcvarsall.bat not found - python

My OS is windows 8 and python version is 3.4, Microsoft visual studio 11.0 .
While trying to install mod_wsgi I am getting vcvarsall.bat not found. I have changed my environment variables VS100COMNTOOLS value to VS110COMNTOOLS. But still getting same error.
I tried to install SDK for windows8 and .netframework 4.0 but it failed.
In my system I have following .net folder: C:\Windows\Microsoft.NET under this I have following folders : assembly; authman; Framework; Framework64.
I also have Microsoft.Net folder in C:\Program Files (x86)\Microsoft.NET.
I installed Windows kit under same folder.
I tried to resolved the problem using nmake -f ap24py34-win64-VC10.
It's giving the following error:
v1077: "c:\program Files <x86>\Microsoft Visual Studio 11.0\VC\BIN\c1.Exe":return code '0x2' stop.
Please help me to fix this problem
Thanks in advance
According to this page python 3.4 needs Visual C++ 10.0. You actually need it installed. If you read further down the page, you'll find a link to a standalone distro provided by MS. Installing this should fix the problem.

Categories