pyfly2 icon indicating copy to clipboard operation
pyfly2 copied to clipboard

Windows 7 32-bit, Anaconda, Python 2.7 install issue

Open HM0880 opened this issue 9 years ago • 10 comments

I'm trying to install this on Windows 7 32-bit, Anaconda, Python 2.7. I get the output below when running python setup.py build_ext --inplace. I tried to run \pyfly2\examples\simple\benchmark.py anyway, and I got the error ImportError: No module named pyfly2.

Any help would be greatly appreciated!

c:\Anaconda\pyfly2>python setup.py build_ext --inplace
running build_ext
cythoning pyfly2.pyx to pyfly2.c
building 'pyfly2' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\Anaconda\Scripts\gcc.bat -mdll -O -Wall -I. "-IC:\Program Files\Point Grey Research\FlyCapture2\include" -IC:\Anaconda\include -IC:\Anaconda\PC -c pyfly2.c -o build\temp.win32-2
.7\Release\pyfly2.o

pyfly2.c: In function '__Pyx_RaiseArgtupleInvalid':
pyfly2.c:6893:18: warning: unknown conversion type character 'z' in format [-Wformat]
pyfly2.c:6893:18: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'Py_ssize_t' [-Wformat]
pyfly2.c:6893:18: warning: unknown conversion type character 'z' in format [-Wformat]
pyfly2.c:6893:18: warning: too many arguments for format [-Wformat-extra-args]
writing build\temp.win32-2.7\Release\pyfly2.def
C:\Anaconda\Scripts\gcc.bat -shared -s build\temp.win32-2.7\Release\pyfly2.o build\temp.win32-2.7\Release\pyfly2.def "-LC:\Program Files\Point Grey Research\FlyCapture2\lib\C" -LC:
\Anaconda\libs -LC:\Anaconda\PCbuild -lFlyCapture2_Cd_v90 -lpython27 -lmsvcr90 -o c:\Anaconda\pyfly2\pyfly2.pyd

HM0880 avatar Apr 27 '15 17:04 HM0880

Do you get a file called "pyfly2.pyd" created as a result of your build?

kbrafford avatar Apr 27 '15 17:04 kbrafford

Yes. I added the location of the main pyfly2 folder to my Anaconda path.

Now I'm getting this error:

ImportError: DLL load failed: The application has failed to start because its side-by-side configuration is incorrect. Please see the application event log or use the command-line sxstrace.exe tool for more detail.

I used sxstrace.exe and got this log:

=================
Begin Activation Context Generation.
Input Parameter:
    Flags = 0
    ProcessorArchitecture = x86
    CultureFallBacks = en-US;en
    ManifestPath = C:\Anaconda\pyfly2\FlyCapture2_Cd_v90.dll
    AssemblyDirectory = C:\Anaconda\pyfly2\
    Application Config File = 
-----------------
INFO: Parsing Manifest File C:\Anaconda\pyfly2\FlyCapture2_Cd_v90.dll.
    INFO: Manifest Definition Identity is (null).
    INFO: Reference: Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8"
INFO: Resolving reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
    INFO: Resolving reference for ProcessorArchitecture x86.
        INFO: Resolving reference for culture Neutral.
            INFO: Applying Binding Policy.
                INFO: No publisher policy found.
                INFO: No binding policy redirect found.
            INFO: Begin assembly probing.
                INFO: Did not find the assembly in WinSxS.
                INFO: Attempt to probe manifest at C:\Windows\assembly\GAC_32\Microsoft.VC90.DebugCRT\9.0.21022.8__1fc8b3b9a1e18e3b\Microsoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at C:\Anaconda\pyfly2\Microsoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at C:\Anaconda\pyfly2\Microsoft.VC90.DebugCRT.MANIFEST.
                INFO: Attempt to probe manifest at C:\Anaconda\pyfly2\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.DLL.
                INFO: Attempt to probe manifest at C:\Anaconda\pyfly2\Microsoft.VC90.DebugCRT\Microsoft.VC90.DebugCRT.MANIFEST.
                INFO: Did not find manifest for culture Neutral.
            INFO: End assembly probing.
    ERROR: Cannot resolve reference Microsoft.VC90.DebugCRT,processorArchitecture="x86",publicKeyToken="1fc8b3b9a1e18e3b",type="win32",version="9.0.21022.8".
ERROR: Activation Context generation failed.
End Activation Context Generation.

This "side-by-side" error seems to be a common problem. I uninstalled all of the Microsoft Visual C++ versions on my computer; then I re-installed the 2005, 2008, and 2010 versions (all x86). Still not working.

HM0880 avatar Apr 27 '15 19:04 HM0880

Sorry for the delay. What version of the FlyCapture SDK do you have installed? Are you free to install a back-level version?

kbrafford avatar Apr 29 '15 00:04 kbrafford

In my start menu, I have Point Grey FlyCapture2 SDK. And in my program files, I have C:\Program Files\Point Grey Research\FlyCapture2. I was able to find all three DLLs you mentioned in the install instructions in FlyCapture2\bin.

Thanks so much for your help!

HM0880 avatar Apr 29 '15 11:04 HM0880

I meant the version number of your FlyCapture SDK. If you're using the latest, 2.7, can you uninstall that one and try 2.6? I've seen problems like this before on 2.7.

http://www.ptgrey.com/support/downloads

kbrafford avatar Apr 29 '15 15:04 kbrafford

I uninstalled v2.7 with Revo Uninstaller and installed v2.6.3.4. I moved the DLLs from the v2.6.3.4 install into the pyfly2 folder, rebuilt the package with python setup.py build_ext --inplace, and got skipping 'pyfly2.c' Cython extension (up-to-date).

I got the exact same error as above and the exact same log with sxstrace.exe.

HM0880 avatar Apr 29 '15 16:04 HM0880

Any other suggestions? Thanks for your help.

HM0880 avatar May 04 '15 13:05 HM0880

Do you have the ability to try this all out on a 64 bit windows setup? The reason I ask is that both of my configurations are like this:

Windows 7, 64-bit Python 2.7 (32-bit) FlyCapture SDK 2.6.3.4 64-bit install, with the 32 bit DLLs copied to the PyFly2 install normal USB driver (not the "pro" version that takes over your USB ports)

kbrafford avatar May 04 '15 22:05 kbrafford

I'll do a fresh install of Visual Studio and python and see if I can capture all of the output so you can compare.

kbrafford avatar May 04 '15 22:05 kbrafford

I will try this in (1) 64-bit Windows and (2) normal (not "pro") FlyCapture. Thanks so much for all your help.

HM0880 avatar May 04 '15 23:05 HM0880