Re: KivEnt without Cymunk on Windows (64 bit)

105 views
Skip to first unread message

Jacob Kovac

unread,
Apr 5, 2018, 11:20:03 AM4/5/18
to Kenneth Solano, KivEnt
You might want to reach out to the builder of the wheels to see how they managed to get kivent_cymunk built on windows for python3.6 in the first place.

alloca.h is configured weirdly on windows, i think its technically found in malloc.h

This might be a bug with the chipmunk library version that cymunk builds against.

On Wed, Apr 4, 2018 at 8:34 AM, Kenneth Solano <kennet...@gmail.com> wrote:
Hi,

  • I'm using Windows 10 (64 bit)
  • Installed Python 3.6.5 (64 bit) as normal.
  • I followed Kivy's installation instructions (the stable version at the top of the documentation, not the development one).
  • Installed KivEnt from the wheels in this link:

  • Everything installed with no errors.

Testing:

  • Open CMD.
  • Write "python" to start the python console.
  • Write "import kivent_core" and there's no error.
  • Write "import kivent_cymunk" there's an error as cymunk can't be found.
  • Write "import cymunk"
>>> import cymunk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python\Python36\cymunk-master\cymunk\__init__.py", line 1, in <module>
    from .cymunk import *
ModuleNotFoundError: No module named 'cymunk.cymunk'

  • Download cymunk from github master as a zip file and uncompress in the directory containing Python36
  • Enter the cymunk-master directory (C:\Python\Python36\cymunk-master\)
  • Write "setup.py install" and get a larger log ending as follows:

cymunk.c
c:\python\python36\cymunk-master\cymunk\chipmunk/chipmunk.h(36): fatal error C1083: Cannot open include file: 'alloca.h': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.10.25017\\bin\\HostX86\\x64\\cl.exe' failed with exit status 2

  •  Try to reinstall kivent_cymunk from the wheel again.
C:\Python\Python36>pip install KivEnt_Cymunk-1.0.0-cp36-cp36m-win_amd64.whl
Requirement already satisfied: KivEnt-Cymunk==1.0.0 from file:///C:/Python/Python36/KivEnt_Cymunk-1.0.0-cp36-cp36m-win_amd64.whl in c:\python\python36\lib\site-packages

How can I fix it?
 

--
You received this message because you are subscribed to the Google Groups "KivEnt" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivent+unsubscribe@googlegroups.com.
To post to this group, send email to kiv...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivent/728d14b1-f882-4fbe-948b-4edcefecb007%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

Kenneth Solano

unread,
Apr 5, 2018, 2:19:15 PM4/5/18
to KivEnt
Downloaded MinGW from this link:


gcc version 7.3.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project)

Cython 0.28.1

I did the following:

  • Add mingw in the PATH variable (C:\Program Files\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev0\mingw64\bin for me)
  • Test by opening command line and command gcc works ( I have no other compilers)
  • Create distutils.cfg in C:\Python36\Lib\distutils
  • Add lines in that file:

    [build]  
    compiler
= mingw32


  • Manually applying [this patch](https://bugs.python.org/file40608/patch.diff) (I had to manually open the file in C:\Python36\Lib\distutils\cygwinccompiler.py find the context about line 82 to 84 and manually insert the lines starting with a '+' in the patch.diff file). This fixed the "ValueError: Unknown MS Compiler version 1900" error.

  •  copy C:\Windows\System32\vcruntime140.dll to C:\Python36\libs\

   
copy C:\Windows\System32\vcruntime140.dll C:\Python36\libs\


or just go to C:\Windows\System32\
copy **vcruntime140.dll**
and paste it to  C:\Python36\libs\


  setup.py install

and now Cymunk will compile.
To unsubscribe from this group and stop receiving emails from it, send an email to kivent+un...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages