Start a new topic

Problems using OpenFlight API

Original Post by: IanCheung Mon Nov 8 13:55:52 2010


Hi All


I've been having problems accessing the OpenFlight API from python. I always get the same error message


ImportError: No module named _mgapilib


I am running Windows 7 (which I know is officially unsupported, but I have been able to do OpenFlight scripting on Windows 7 in the past), 64 bit


Sofar I have tried 32 and 64 bit pythons (2.6.6) and OpenFlight API v. 4.1 and 4.1.2, both 32 and 64 bits, and both VC6 and VC8 versions. I get the same error message each time I try


import mgapilib


I get


Traceback (most recent call last):

File "<pyshell#1>", line 1, in <module>

import mgapilib

File "C:\Presagis\OpenFlight_API_4_1\bin\debug\mgapilib.py", line 7, in <module>

import _mgapilib

ImportError: No module named _mgapilib


I have tried setting my environment variables "PYTHONPATH" and "PRESAGIS_OPENFLIGHT_SCRIPT" to "C:\Presagis\OpenFlight_API_4_1\bin\debug" and I've also tried "C:\Presagis\OpenFlight_API_4_1\bin\release" but I get the same messages each time.


Does anyone have any suggestions on what I could try next?


EDIT: I have also tried putting the Openflight libraries in my site-packages directory within my python folder, same error


Thanks,


Ian


Original Post by: SteveThompson Mon Nov 8 16:55:44 2010


Make sure you start with Python 2.5.X. OpenFlight Script is only compatible with that version. After switching to 2.5.X and you still have the problem, let us know.

Original Post by: IanCheung Mon Nov 8 17:10:41 2010


*sigh*


That worked. Sorry for wasting time :)


Thanks Steve,


Ian

Original Post by: SteveThompson Mon Nov 8 17:40:11 2010


No problem... I'm glad that's all it was.


If you have any other problems or questions, let us know.

Login to post a comment