1

I am running the following:

import sys 
sys.path.append("C:\\Program Files (x86)\\fme\\fmeobjects\\python27") 
import fmeobjects

In that directory lives the file:

fmeobjects.pyd

I have two Python interpeters set up. When I run under one, there is no error. When I run under the other, it throws

ImportError: DLL load failed: The specified module could not be found.

I don't understand why it's looking for a .dll, or if a .pyd file should satisfy it (it's my understanding they are broadly equivalent).

Given that I am explicitly telling it where to look for fmeobjects, why is it failing to find it? Why could it be failing on only one interpreter?

Thanks in advance

Ben Mayo
  • 1,285
  • 2
  • 20
  • 37

1 Answers1

0

The quickest way to solve any problem that's been plaguing you for days is to ask on SO. You'll then work it out in minutes.

In my case I had Environment variables from one interpreter set up in the other. I assume this was overriding the explicit sys.path.ammend in my code. This menu is found at

Window > Preferences > PyDev > Interpreter > Python Interpreter > Environment

Maybe this might help someone else one day.

Ben Mayo
  • 1,285
  • 2
  • 20
  • 37