-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
setproctitle fails if you have imported numpy #42
Comments
Uhm... it works for me:
My versions are: |
Mine are: And: (both fail) |
It would be interesting to know if anything changed in numpy 1.9 We can have a proof by patching
Compiling it with:
[Fixed: was And running it with:
My result with numpy 1.8.2 is that the environment is not changed:
Could you please try this test and report the result? Thank you. |
Sorry, there's a problem and it seems |
Ok, from the above, compile
to test it's compiled right:
As you can see on my system the environ isn't moved. |
I can confirm it breaks for numpy>=1.9.0; but yeah, it didn't show changes in environ. |
Can I see the output of:
thank you |
Here it is, thank you for your help:
|
It is embedding Python2, see my comment above. Delete |
Done it:
|
This seems to prove that Unfortunately I don't think I can do anything about it: in Python3 the You should try importing |
Thank you for the effort @dvarrazzo. I wonder why numpy needs to do this... I was looking into their code but couldn't find it yet. The workaround of importing setproctitle before numpy works alright. Thanks! |
No problem. I will close this issue as I don't think I can do much but I'll report the thing to numpy. Before doing that, can you verify if python3 + numpy 1.8 doesn't change environ? Maybe it's only a Mac OS X thing (I'm on Ubuntu 14.04 here).
|
I don't think the bug is OS X related, as I was able to reproduce it on Debian Jessie too. Python3 + numpy 1.8.2 doesn't change environ on my Mac:
Maybe we could include this as a known issue in the README? |
We know now it's related to numpy 1.9 and not to the OS. Time to hear from them. Maybe they can fix it in 1.9.next. |
So, it seems |
Partially reverts b28801d. Imports and uses module early in balsam import to avoid possible issues with numpy, see: dvarrazzo/py-setproctitle#42 Possible alternative that does not rely on external module might be: https://stackoverflow.com/questions/31132342/change-process-name-while-executing-a-python-script
The module seems to fail to find environ address after importing numpy.
Without numpy:
With numpy:
The text was updated successfully, but these errors were encountered: