python - Gettiing Cython up and running on OS X -


I think there has been an error in setting up the Sithon on OS X, although I did not get the error during installation.

  • Download Cyhthon and transfer the tarball to my home folder
  • Open the turboch and python setup.py install / code> < / P>
      libc.stdlib cimport rand, from RAND_MAX  

    Especially I can see that neither import libc.stdlib and Neither does cimport work on their own

    What am I trying to do, using the random number generator is the following. I am feeling that I am just leaving something very clear which can be more with the normal installation of python module and nothing can do with Cython

However, it does not work when trying in Python:

  from libc. Specially I can see that neither  import libc.stdlib  nor  simport  Work on your own. 

That's because they do not work in Python code, they only work in Sithon code.

In the Cython, there are some different ways to create programs or extensions and make them ( pyximport , which is necessary on the runtime, allows the building).

The tutorial covers also below, in. It shows you how to put this code into a different file with extension, .pyx , and run a simple setup.py to create and create it And then .py Import the build module from the script


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -