Python Forum

Full Version: Help with Cython in Win 10
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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'