CNnman / Cython-use

Cython begin
0 stars 0 forks source link

Cython #1

Open CNnman opened 5 years ago

CNnman commented 5 years ago

dope@dope-Lenovo-ideapad-Y700-14ISK:~/Desktop/Data/Cython$ python3 setup.py build_ext --inplace

Compiling hello.pyx because it changed. [1/1] Cythonizing hello.pyx /home/dope/.local/lib/python3.6/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /home/dope/Desktop/Data/Cython/hello.pyx tree = Parsing.p_module(s, pxd, full_module_name) running build_ext building 'hello' extension creating build creating build/temp.linux-x86_64-3.6 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c hello.c -o build/temp.linux-x86_64-3.6/hello.o x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.6/hello.o -o /home/dope/Desktop/Data/Cython/hello.cpython-36m-x86_64-linux-gnu.so

above this is a ubuntu running a python code with Cython,and it works apparently,if you use Windows platform,you need to install gcc compiler

CNnman commented 5 years ago

dope@dope-Lenovo-ideapad-Y700-14ISK:~/Desktop/Data/Cython$ python3 Python 3.6.8 (default, Aug 20 2019, 17:12:48) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

import hello hello world!