Cython with pythonxy

不羁岁月 提交于 2019-12-11 09:40:00

问题


I'm trying to use Cython but I can't seem to find a way of getting it to work.

  1. I installed pythonxy, which comes with Cython.
  2. I installed MS VS 2008 Express (https://go.microsoft.com/?linkid=7729279)
  3. Then I installed the Cython plugin for pythonxy from the standard plugins web page (https://code.google.com/p/pythonxy/wiki/StandardPlugins) just in case.

However, I get this error:

ImportError: Building module MyCyModule failed: ["ValueError: [u'path']\n"]

I have my MWE below:


MyCyModule.pyx

print 'Hello World'

TestCyModule.py

import pyximport
pyximport.install()
import MyCyModule

回答1:


To solve this I installed: Windows SDK for Windows Server 2008 and .NET Framework 3.5

Full credit to this blog post: http://springflex.blogspot.com/2014/02/how-to-fix-valueerror-when-trying-to.html, although I didn't need the extra steps copying the bat files (point 3 and onward)

Download from here (I used the Web Setup from the installation instructions and unchecked the documentation which saved a lot of space): http://www.microsoft.com/downloads/details.aspx?FamilyId=E6E1C3DF-A74F-4207-8586-711EBE331CDC&displaylang=en



来源:https://stackoverflow.com/questions/32171369/cython-with-pythonxy

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!