Skip to main content
Question

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

  • August 21, 2018
  • 8 replies
  • 217 views

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

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

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

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

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

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
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.