Python Forum
Help with building Cython modules.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with building Cython modules.
#1
After a week of pure hell and lot's of help I seem to have Cython and a compiler installed and working in Win 10.
I seem to have pyximport working now.
Setup.py does generate a .c file when I run it in IDLE now.

I have tried many variations of python setup.py build_ext --inplace to build the .so but I just can't get anything out of it.
Seems to be complaining about the directory.
I suck and power shell and I can get back to c: but that's about it. Python folder is buried deep and I don't even know how to get there.
Please god someone tell me there is an easier way to use build then to have to manually type through 15 folders in the CMD every time I want to use it.
I did hear there is something called easycython but I can't find anything in Google.

Hope someone can help. Thanks

UPDATE:
Hmm...I think I just got it working. file called cythonTestFunction.cp36-win32 and one called cythonTestFunction.pyx showed up. The wrapper program works now. I think it's working but I need help understanding the steps and maybe a shortcut to doing the build part. What does each file do etc?

I got it worked out now. Wrote a batch file to make building easier. If anyone needs help getting this running Windows maybe I can help. Cython has reduced by test function from 9.8 seconds to 0.0440 seconds. Amazing...
Reply
#2
Hi, i like view your .bat
Thanks
Reply
#3
easy cython pypi page is here: https://pypi.org/project/easycython/
and github here: https://github.com/cjrh/easycython
you can install with:
pip install easycython
I haven't used it, so can't vouch for it, but now at least you know how to get it.

FYI: If any package can be installed with pip, you will find it here: https://pypi.org/
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cython, Pandas, and Chained Assignment sawtooth500 4 236 Apr-13-2024, 04:18 AM
Last Post: sawtooth500
  I need to add data types to cython conversion python to c Good_AI_User 1 1,010 Aug-19-2022, 07:52 AM
Last Post: Gribouillis
  unable to load an image with C (Cython) HLD202 0 1,313 Jan-13-2022, 09:16 PM
Last Post: HLD202
  Cython np.where slows down the code Johanoosterwaal 1 1,732 Sep-01-2021, 07:33 AM
Last Post: Johanoosterwaal
  How can I use Cython to protect my Python Code? TurboC 2 4,141 Dec-03-2020, 10:37 AM
Last Post: padma121
  Why does Cython generates bad code for Gentoo? AlekseyPython 1 1,851 Dec-26-2019, 01:57 PM
Last Post: AlekseyPython
  How I can speed up my Cython module? AlekseyPython 0 1,705 Oct-26-2019, 01:23 PM
Last Post: AlekseyPython
  Error in compiling cython extension on Python 3.6.4 on Windows 8 goldenmean 3 5,780 Jun-05-2019, 09:37 PM
Last Post: Larz60+
  cython does not work skorost5 5 4,260 Dec-19-2018, 09:23 AM
Last Post: skorost5
  Help with Cython in Win 10 jarrod0987 0 3,018 Oct-06-2018, 12:16 PM
Last Post: jarrod0987

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020