Skip to main content
Question

Is it not possible to use the multiprocessing library within python?


paalped
Contributor
Forum|alt.badge.img+5

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

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

Traceback (most recent call last):

  File "<string>", line 19in input

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

    context=self.get_context())

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

    self._repopulate_pool()

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

    w.start()

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

    self._popen = self._Popen(self)

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

    return Popen(process_obj)

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

    NoneNoneFalse0NoneNoneNone)

FileNotFoundError: [WinError 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..

8 replies

geosander
Forum|alt.badge.img+7
  • August 21, 2018

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


david_r
Celebrity
  • August 21, 2018

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


david_r
Celebrity
  • August 21, 2018

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.


geosander
Forum|alt.badge.img+7
  • August 21, 2018
david_r wrote:

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.

 


paalped
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 21, 2018
geosander wrote:

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.

paalped
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 21, 2018
david_r wrote:

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.

 

 


david_r
Celebrity
  • August 21, 2018
paalped wrote:
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.

david_r
Celebrity
  • April 2, 2019

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings