[Cython] Status

John Skaller2 skaller at internode.on.net
Thu Jan 30 02:58:34 EST 2020



> On 30 Jan 2020, at 18:44, John Skaller2 <skaller at internode.on.net> wrote:
> 
> 
> 
>> On 30 Jan 2020, at 17:20, John Skaller2 <skaller at internode.on.net> wrote:
>> 
>> Just FYI, trying to load my extension I get “ModuleNotFound”.
> 

> ~/felix>/usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/bin/python3.6m
> Python 3.6.5 (default, Apr 25 2018, 14:26:36)
> [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import test
> Traceback (most recent call last):
>  File "<stdin>", line 1, in <module>
> ImportError: bad magic number in 'test': b'\x03\xf3\r\n’

Oh, sorry! This was a *pyc file hanging around. After deleting it Python happily
loaded the wrong module because I picked a bad name. So ..

/Users/skaller/cython/Cython/Compiler/Main.py:344: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /Users/skaller/felix/oldtest.py
  tree = Parsing.p_module(s, pxd, full_module_name)
~/felix>clang -I /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/include/python3.6m/ -L /usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/lib -lpython3.6m  -dynamic -shared -o oldtest.dylib oldtest.c
~/felix>mv oldtest.py oldertest.py
~/felix>/usr/local/opt/python/Frameworks/Python.framework/Versions/3.6/bin/python3.6m
Python 3.6.5 (default, Apr 25 2018, 14:26:36)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import oldtest
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'oldtest'
>>>

which is the same problem my Felix generated C is giving.

—
John Skaller
skaller at internode.on.net







More information about the cython-devel mailing list