This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [Cygwin] multiprocessing module with pool object issue
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 2.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Julien Verger, nkjensen, pitrou
Priority: normal Keywords:

Created on 2017-06-04 06:54 by Julien Verger, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg295114 - (view) Author: Julien Verger (Julien Verger) Date: 2017-06-04 06:54
Hello,

i'm trying to use the sample code that is documented here: https://docs.python.org/2/library/multiprocessing.html
from multiprocessing import Pool

def f(x):
    return x*x

if __name__ == '__main__':
    p = Pool(5)
    print(p.map(f, [1, 2, 3]))

This code behaves differently depending on the python version that i use.
I use 2 versions of python interpreter, first on my windows 7 OS and second in cygwin.
The code behaves normaly when i execute it on windows python version, but nothing seems to happen when i use python interpreter from cygwin.
Other objects than 'pool' seems to be impacted but this short exemple helps me to show how to reproduce quickly my issue.

Here are somme informations on the python versions that i'm using:
On the windows side:
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.                          

On the cygwin side:
Python 2.7.13 (default, Mar 13 2017, 20:56:15)                           
[GCC 5.4.0] on cygwin                                                    
Type "help", "copyright", "credits" or "license" for more information.

Please help

Regards
msg295869 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2017-06-13 08:42
How did you get Python for Cygwin? Did you compile it yourself?
Python is not supported on Cygwin (we recommend using the native Windows builds instead) and I'm not surprised that multiprocessing, which uses delicate platform-specific code, would fail working on that platform.
msg296009 - (view) Author: Julien Verger (Julien Verger) Date: 2017-06-14 14:58
Hello Antoine,

I've installed python throught the cygwin.exe installer.
I've tried to add many pythons libs without more success.
I didn't know that cygwin was an unsupported platform.
Unfortunately, my goal is to develop an automation tool based on pexpect package which does not work the same on windows build (e.g. pexpect.spawn instruction wich is not compatible on windows).
I thought that i could bypass this by using pexpect on cygwin that works great but i would like to launch multiple pexpect thread in parallel by using multithread package in my cygwin environment.

Julien
msg323466 - (view) Author: Niels Kristian Jensen (nkjensen) Date: 2018-08-13 07:21
I ran the same test on Windows 10, works fine, but Windows Server 2012 bails out with no message, no abnormal exit code.

@Antoine Pitrou - if Cygwin and Python3 are non-compatible, I suggest that someone in the Python3 community writes a note about this, for reference.

In fact, the Python package should probably be removed from Cygwin?
msg323469 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2018-08-13 09:25
> In fact, the Python package should probably be removed from Cygwin?

We don't maintain Cygwin nor Python on Cygwin here.  You should contact those people.
History
Date User Action Args
2022-04-11 14:58:47adminsetgithub: 74748
2021-06-18 16:13:05iritkatrielsetstatus: open -> closed
resolution: third party
stage: resolved
2018-08-13 09:25:55pitrousetmessages: + msg323469
2018-08-13 07:21:48nkjensensetnosy: + nkjensen
messages: + msg323466
2017-06-14 14:58:19Julien Vergersetmessages: + msg296009
2017-06-13 08:43:10vstinnersettitle: multiprocessing module with pool object issue -> [Cygwin] multiprocessing module with pool object issue
2017-06-13 08:42:13pitrousetnosy: + pitrou
messages: + msg295869
2017-06-04 06:54:26Julien Vergercreate