Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with Cython in Win 10
#1
Trying to get it up and running so I can learn it.
I am pretty sure Cython and miniGW are installed. They seemed to match the demo video's process.
I also have the shortcut for msys which can bring up a terminal with a $

When I make a setup.py for my function and run it in IDLE I do get a .c but no .so
When it comes to building, I don't even know if I am supposed to be using power shell or msys console.
Either way I get an error.

When I use PowerShell(in the folder with all the python scripts etc) I put..

python setup.py build_ext --inplace
I get the error:
Error:
running build_ext building 'cythonTestFunction' extension error: Unable to find vcvarsall.bat
when I try it in msys I get:
Error:
jarrod0987@Bolt ~ $ python setup.py build_ext --inplace c:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\python.exe: can't open file 'setup.py': [Errno 2] No such file or directory jarrod0987@Bolt ~ $
Can anyone tell me how to get this working? BTW I did also do some stuff in the environmental PATH area but no way to tell if it's right or not. None of the examples online ever match each other or my system when it comes to that. Most are really old.

UPDATE: I read that this error can be fixed by installing Visual Studio along with it's Python Dev package. Tried it, same error...

UPDATE: I found an article talking about making a distutils.cfg file so I tried that. New error now.
Error:
running build_ext Traceback (most recent call last): File "setup.py", line 8, in <module> ext_modules = cythonize('cythonTestFunction.pyx') File "C:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\lib\distutils\core.py", line 148, in setup dist.run_commands() File "C:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 955, in run_commands self.run_command(cmd) File "C:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\lib\distutils\dist.py", line 974, in run_command cmd_obj.run() File "C:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\lib\distutils\command\build_ext.py", line 308, in run force=self.force) File "C:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\lib\distutils\ccompiler.py", line 1031, in new_compiler return klass(None, dry_run, force) File "C:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\lib\distutils\cygwinccompiler.py", line 282, in __init__ CygwinCCompiler.__init__ (self, verbose, dry_run, force) File "C:\Users\jarrod0987\AppData\Local\Programs\Python\Python36-32\lib\distutils\cygwinccompiler.py", line 126, in __init__ if self.ld_version >= "2.10.90": TypeError: '>=' not supported between instances of 'NoneType' and 'str'
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cython, Pandas, and Chained Assignment sawtooth500 4 262 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,019 Aug-19-2022, 07:52 AM
Last Post: Gribouillis
  unable to load an image with C (Cython) HLD202 0 1,321 Jan-13-2022, 09:16 PM
Last Post: HLD202
  Cython np.where slows down the code Johanoosterwaal 1 1,742 Sep-01-2021, 07:33 AM
Last Post: Johanoosterwaal
  How can I use Cython to protect my Python Code? TurboC 2 4,146 Dec-03-2020, 10:37 AM
Last Post: padma121
  Why does Cython generates bad code for Gentoo? AlekseyPython 1 1,854 Dec-26-2019, 01:57 PM
Last Post: AlekseyPython
  How I can speed up my Cython module? AlekseyPython 0 1,709 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,786 Jun-05-2019, 09:37 PM
Last Post: Larz60+
  cython does not work skorost5 5 4,271 Dec-19-2018, 09:23 AM
Last Post: skorost5
  Help with building Cython modules. jarrod0987 2 3,334 Nov-15-2018, 03:57 AM
Last Post: Larz60+

Forum Jump:

User Panel Messages

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