Skip to content
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

[macOS] Unable to run psutil using py2.7 #1798

Closed
doneria-anjali opened this issue Jul 27, 2020 · 1 comment
Closed

[macOS] Unable to run psutil using py2.7 #1798

doneria-anjali opened this issue Jul 27, 2020 · 1 comment

Comments

@doneria-anjali
Copy link

Platform

  • { 11.0 Beta }
  • { psutil version: 5.7.2 }
  • { python version: 2.7.16 }

Bug description
Traceback (most recent call last):
File "", line 1, in
File "/Library/Python/2.7/site-packages/psutil/init.py", line 159, in
from . import _psosx as _psplatform
File "/Library/Python/2.7/site-packages/psutil/_psosx.py", line 15, in
from . import _psutil_osx as cext
ImportError: dynamic module does not define init function (init_psutil_osx)

I am installing psutil library using pip2 (pip2 install psutil) which should be building the library using py2, instead of py3 but when I try to import psutil in python2 script, above error is thrown. What would be the correct way to use this library in a py2 script?

@giampaolo
Copy link
Owner

Python wheels for macOS (including for py 2.7) are now uploaded on PYPI, so this should be solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants