-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wheel: script with multiprocessing doesn't work on Windows #1891
Comments
http://bugs.python.org/issue10845 shouldn't be related to this, as that only affects running with the "-m" switch. However, a potentially relevant different here is that (if I understand things correctly), when installing from source, setuptools generates the wrapper script/executable, while when installing from a wheel, pip does it. |
That certainly sounds possible. The wrappers used when installing from a wheel are based on distlib's ScripMaker module, but with a modified template (see https://github.com/pypa/pip/blob/develop/pip/wheel.py#L284). It would be useful to comment out lines 284-305 of pip/wheel.py, and retry the test. If that fixes the problems, pip's modified wrapper is the issue. Otherwise, it's likely to be a distlib issue in ScriptMaker. |
Commenting out this part (line numbers have changed) and reinstalling, the problem still occurs (the produced This may affect more users now that pip builds wheels for sdist packages by default. |
A workaround is to run I find it somewhat confusing that there are so many (independent?) code paths for launcher installation. |
This is really annoying, I'm stumbling upon this issue from time to time after upgrades. Is there an option to globally disable wheels ( |
From http://pip.readthedocs.org/en/stable/reference/pip_install/#install-no-binary
|
@piotr-dobrogost there is already A pip.ini with
doesn't work nor a BTW, |
OK, looks like the correct way to set this is
Or Weird... |
PIP-VERSION: 7.1.2 This problem is not related to wheel-based installations. WORKAROUNDS (alternatives):
EXAMPLE:
MAYBE: |
It's important to keep in mind here that the interaction between This is fixed in Python 3.4+, as the ability to select the "spawn" The multiprocessing support in 2.7 is now ~5 years older than that in |
Yes, obviously. So an universal Script launcher shouldn't use it. Why does installing a wheel creating a different launcher than setuptools's default? @jenisys That's probably the case because pip is creating a wheel from sdist packages since a while now. So it's an issue with wheels. |
@ncoghlan I analysed this a little bit. The launcher from distlib/pip does basically This means it is probably related to http://bugs.python.org/issue10845 as I initially thought! |
Report upstream against distlib/simple_launcher: https://bitbucket.org/vinay.sajip/simple_launcher/issues/1/scripts-with-multiprocessing-broken-on |
Will be fixed in Python 2.7.11: http://bugs.python.org/issue10128 |
Closing this, this is a bug with Python itself and it appears fixed in 3.x and 2.7.111 so the recommendation is to get a newer Python if you are hitting this. |
setup.py
blub.py
When installing this without wheel, everything is fine:
Installing this as wheel, the script is broken:
This is probably related to http://bugs.python.org/issue10845.
The text was updated successfully, but these errors were encountered: