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

Doesn't works with PyPy 1.7 / Mac OS X 10.6.8 #239

Closed
giampaolo opened this issue May 23, 2014 · 10 comments
Closed

Doesn't works with PyPy 1.7 / Mac OS X 10.6.8 #239

giampaolo opened this issue May 23, 2014 · 10 comments

Comments

@giampaolo
Copy link
Owner

From alexey.p...@qik.com on December 21, 2011 16:13:09

1. Install psutil
2. import psutil

  File "/Users/aleksi/Code/x/y.py", line 8, in <module>
    import psutil
  File "/Users/aleksi/Code/x/env_pypy/site-packages/psutil/__init__.py", line 
77, in <module>
    import psutil._psosx as _psplatform
  File "/Users/aleksi/Code/x/env_pypy/site-packages/psutil/_psosx.py", line 14, 
in <module>
    import _psutil_osx
exceptions.ImportError: unable to load extension module 
'/Users/aleksi/Code/x/env_pypy/site-packages/_psutil_osx.pypy-17.so': 
dlopen(/Users/aleksi/Code/x/env_pypy/site-packages/_psutil_osx.pypy-17.so, 6): 
Symbol not found: _PyExc_OSError
  Referenced from: 
/Users/aleksi/Code/x/env_pypy/site-packages/_psutil_osx.pypy-17.so
  Expected in: flat namespace
 in /Users/aleksi/Code/x/env_pypy/site-packages/_psutil_osx.pypy-17.so

PyPy 1.7.0, 64bit, built with GCC 4.0.1
Mac OS X 10.6.8, 32bit kernel loaded
_psutil_osx.pypy-17.so - 64bit.

Original issue: http://code.google.com/p/psutil/issues/detail?id=239

@giampaolo
Copy link
Owner Author

From alexey.p...@qik.com on December 21, 2011 07:15:02

psutil version 0.4.1.

@giampaolo
Copy link
Owner Author

From g.rodola on December 21, 2011 09:36:38

> Symbol not found: _PyExc_OSError

I saw similar errors on systems where python headers weren't installed (e.g. on 
ubuntu you get them with "sudo apt-get install python-dev").
Are you able to compile with cPython?
Have you tried to delete "build" directory before installing?
That often causes troubles when the source is compiled/installed for different 
python versions.

@giampaolo
Copy link
Owner Author

From alexey.p...@qik.com on December 21, 2011 23:41:54

> I saw similar errors on systems where python headers weren't installed (e.g. 
on ubuntu you get them with "sudo apt-get install python-dev").

I use PyPy from official site, headers are in place. Also, it should prevent 
compiling, not importing, right?

> Are you able to compile with cPython?

Yes, it works great with CPython 2.7.2.

> Have you tried to delete "build" directory before installing?

In fact I use virtualenv, so I doesn't have build directory.


I noticed something strange:

otool -L /Users/aleksi/Code/x/env_pypy/site-packages/_psutil_osx.pypy-17.so
/Users/aleksi/Code/x/env_pypy/site-packages/_psutil_osx.pypy-17.so:
    build/lib.macosx-10.6-x86_64-2.7/_psutil_osx.pypy-17.so (compatibility version 
0.0.0, current version 0.0.0)
    /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 
(compatibility version 150.0.0, current version 550.44.0)
    /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility 
version 1.0.0, current version 275.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

It depends on file in build directory, which is removed during pip's clean up step.

@giampaolo
Copy link
Owner Author

From g.rodola on December 22, 2011 09:26:44

Try not to use virtualenv and make sure 'pypy -c "import psutil"' raises 
ImportError, then try to reinstall.

@giampaolo
Copy link
Owner Author

From alexey.p...@qik.com on December 23, 2011 05:36:27

Same error.

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/Cellar/pypy/1.7/site-packages/psutil/__init__.py", line 77, 
in <module>
    import psutil._psosx as _psplatform
  File "/usr/local/Cellar/pypy/1.7/site-packages/psutil/_psosx.py", line 14, in <module>
    import _psutil_osx
ImportError: unable to load extension module 
'/usr/local/Cellar/pypy/1.7/site-packages/_psutil_osx.pypy-17.so': 
dlopen(/usr/local/Cellar/pypy/1.7/site-packages/_psutil_osx.pypy-17.so, 6): 
Symbol not found: _PyExc_OSError
  Referenced from: 
/usr/local/Cellar/pypy/1.7/site-packages/_psutil_osx.pypy-17.so
  Expected in: flat namespace
 in /usr/local/Cellar/pypy/1.7/site-packages/_psutil_osx.pypy-17.so

@giampaolo
Copy link
Owner Author

From g.rodola on December 23, 2011 05:50:49

I have no clue, sorry. FWICT, it works on linux + pypy 1.7.
It looks like something related with the system configuration (missing 
headers?) so maybe you can try to ask on pypy ml.

@giampaolo
Copy link
Owner Author

From g.rodola on March 06, 2012 04:37:51

Closing this out.

Status: Invalid

@giampaolo
Copy link
Owner Author

From alexey.p...@gmail.com on March 06, 2012 04:43:08

It's valid, in fact. But I did not find a solution.

@giampaolo
Copy link
Owner Author

From g.rodola on March 06, 2012 04:49:25

Have you tried to ask on pypy forums?

@giampaolo
Copy link
Owner Author

From alexey.p...@gmail.com on March 06, 2012 04:53:16

In IRC only, without luck.
We use Mac for development only, so we did a stub for tests.

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

1 participant