[pypy-issue] Issue #1936: Weird import ctypes error (pypy/pypy)

Anders Hovmöller issues-reply at bitbucket.org
Mon Dec 1 10:38:55 CET 2014


New issue 1936: Weird import ctypes error
https://bitbucket.org/pypy/pypy/issue/1936/weird-import-ctypes-error

Anders Hovmöller:

I get this funny behavior: 

```
#!python

Python 2.7.3 (87aa9de10f9c, Nov 24 2013, 20:57:21)
[PyPy 2.2.1 with GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.2.79)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``"it's likely temporary until
forever" arigo''
>>>> import ctypes
>>>> import gunicorn
>>>> from gunicorn import util
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/andersh/Projects/triresolve/env-pypy/site-packages/gunicorn-0.17.2_trioptima1-py2.7.egg/gunicorn/util.py", line 24, in <module>
    import resource
  File "/usr/local/Cellar/pypy/2.2.1/libexec/lib_pypy/resource.py", line 6, in <module>
    from ctypes_config_cache._resource_cache import *
  File "/usr/local/Cellar/pypy/2.2.1/libexec/lib_pypy/ctypes_config_cache/_resource_cache.py", line 6, in <module>
    globals(), locals(), ["*"])
  File "/usr/local/Cellar/pypy/2.2.1/libexec/lib_pypy/ctypes_config_cache/_resource_64_.py", line 1, in <module>
    import ctypes
ImportError: No module named ctypes
>>>> import ctypes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named ctypes
>>>> 
```


Note that I successfully import ctypes, then I try to import gunicorn and it raises, then I'm in a state where I can't import ctypes anymore.




More information about the pypy-issue mailing list