Skip to main content

So I get this error every time im trying to use the multiprocessing library within python:

Python Exception <FileNotFoundError>: tWinError 2] The system cannot find the file specified

Traceback (most recent call last):

  File "<string>", line 19, in input

  File "C:\apps\FME2018.1_b18474_64\fmepython36\python36.zip\multiprocessing\context.py", line 119, in Pool

    context=self.get_context())

  File "C:\apps\FME2018.1_b18474_64\fmepython36\python36.zip\multiprocessing\pool.py", line 174, in __init__

    self._repopulate_pool()

  File "C:\apps\FME2018.1_b18474_64\fmepython36\python36.zip\multiprocessing\pool.py", line 239, in _repopulate_pool

    w.start()

  File "C:\apps\FME2018.1_b18474_64\fmepython36\python36.zip\multiprocessing\process.py", line 105, in start

    self._popen = self._Popen(self)

  File "C:\apps\FME2018.1_b18474_64\fmepython36\python36.zip\multiprocessing\context.py", line 322, in _Popen

    return Popen(process_obj)

  File "C:\apps\FME2018.1_b18474_64\fmepython36\python36.zip\multiprocessing\popen_spawn_win32.py", line 48, in __init__

    None, None, False, 0, None, None, None)

FileNotFoundError: 8WinError 2] The system cannot find the file specified

Is it for some reason not possible to use this library? 

The code runs in other environment except in FME..

Hi @paalped,

This happens immediately when you do import multiprocessing, for instance?

 

FME's Python environment is special... I believe it has been modified and compiled into a DLL that runs as a subprocess of fme.exe, which is why you won't find a python.exe anywhere inside the FME installation directory.

 

Either way, it seems that it can't import it from the zipped library file somehow. The Python 2.7 library seems to be unzipped (on my 2018.1 32-bit installation at least), so what happens if you switch to 2.7 (just for this test) and try to import the library?

Sander


To expand on what Sander says, the best practice solution here is to download and install a full version of the Python interpreter from e.g. python.org. Make sure that the "bit-ness" (32-bit or 64-bit) matches your FME version and that you don't get a newer Python version than FME supports.

You then point FME to your newly installed Python interpreter:

https://knowledge.safe.com/articles/814/choosing-a-different-python-interpreter-installati.html


For what it's worth, the 'multiprocessing' module is definitely available in 32-bit FME 2018, both for Python 2.7 and 3.6. I was able to import it without any issues.


For what it's worth, the 'multiprocessing' module is definitely available in 32-bit FME 2018, both for Python 2.7 and 3.6. I was able to import it without any issues.

Ah good. I was too lazy (or busy actually :)) to try that out on my machine.

 


Hi @paalped,

This happens immediately when you do import multiprocessing, for instance?

 

FME's Python environment is special... I believe it has been modified and compiled into a DLL that runs as a subprocess of fme.exe, which is why you won't find a python.exe anywhere inside the FME installation directory.

 

Either way, it seems that it can't import it from the zipped library file somehow. The Python 2.7 library seems to be unzipped (on my 2018.1 32-bit installation at least), so what happens if you switch to 2.7 (just for this test) and try to import the library?

Sander

No import is fine, its when calling start() on a process this error occurs. I've been trying every interpreter that is included in FME, but I have not yet tried a standalone python interpreter.

For what it's worth, the 'multiprocessing' module is definitely available in 32-bit FME 2018, both for Python 2.7 and 3.6. I was able to import it without any issues.

have you tried using it? I can import it without issues, but I can not use it as I can outside FME.

 

 


have you tried using it? I can import it without issues, but I can not use it as I can outside FME.

 

 

Sounds like you need to test with the stand-alone interpreter.

Hi @paalped, did you ever find a solution to this issue? I've stumbled on the same type of errors.


Reply